Add optional support for replacing underscores in node names by spaces.
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 Dokuwiki useheading 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 or auction, then if you search in any browser for strings such as auction 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 Dokuwiki useheading option and instead have indexmenu generate items with spaces for you.
Please apply if useful!
Regards,
Does/can this capitalize the first letter of each word?
Does/can this capitalize the first letter of each word?
No, it does not. It removes the underscore from menu listings though.
If someone is wondering:
- git clone https://github.com/samuelet/indexmenu.git
- cd indexmenu
- wget https://github.com/samuelet/indexmenu/pull/166.patch
- patch -p1 < 166.patch
and you are done (remember to add scorespace to the parameters in the indexmenu settings).
4 years ago...
