fix(config): options.darken.sidebars.enabled
#343
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem:
options.darken.sidebars.enabled
andoptions.darken.sidebars.enable
both exist, but it is only one option. The default inconfig.lua
isenable
, but it is referred to asenabled
as well (both in code and docs). It used to beenable
but was renamed toenabled
, so it is technically supposed to beoptions.darken.sidebars.enabled
at this time (as of this commit's parent).Solution: Deprecate and revert
options.darken.sidebars.enabled
back tooptions.darken.sidebars.enable
. This brings it back in-line with the changelog and runtime deprecation checks.enable
is also more consistent as this is what is used in other parts of the config (e.g. config formodules
).Problem: In a couple of places,
options.darken.sidebars
is checked for truthiness. This seems to be a typo ofoptions.darken.sidebars.enable
which is a boolean (unlike the former, which is a table by default and also documented as a table). Tables are always truthy.Solution: Use
options.darken.sidebars.enable
instead ofoptions.darken.sidebars
in conditionals.Reverts: fff3e20, 806903c
Fixes: #306