Add optional support for replacing underscores in node names by spaces. #166
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.
Hello,
This is a patch that adds an option (
scorespace
) that will make indexmenu replace underscores in node names with spaces. Although Dokuwiki has the useheading option, sometimes none of those options are good enough. With the Dokuwikiuseheading
option, you get the choice between having page names with underscores or, in short, using the first heading which is not a viable solution because you may start pages with something else other than a title (ie: "About" or "Introduction", etc...).One of the problems is that, suppose you have a menu item generated as:
auction_items_under_existing_character
and if you stumble onto the page with the index and you know you are looking for something related to
items
orauction
, then if you search in any browser for strings such asauction items
, nothing will be found - even though that exact semantic is present on the page.With this patch and by setting the option
scorespace
to the list of javascript options (next to notoc, and the rest), indexmenu will replace any underscores in node names with a single space character. It is a solution local to indexmenu to avoid setting the Dokuwikiuseheading
option and instead have indexmenu generate items with spaces for you.Please apply if useful!
Regards,