00103: separate functions for page name and wiki word spacing
Description: In implementing an Cookbook/AlternateNamingScheme, I found it really useful to have 2 separate functions: SpacePageName and SpaceWikiWord. By default, PmWiki would set these both to 'AsSpaced'. In particular, would it be possible to add the following to trails.php
global $AsSpacedFunction,$SpaceWikiWordsFunction; SDV($SpaceWikiWordsFunction,$AsSpacedFunction); ... the code that wraps WikiWords in [[ ... ]] would include a = ($SpaceWikiWords) ? $SpaceWikiWordsFunction( ... ) : ...
Right now, trails built using wiki words don't work correctly with the alternate naming scheme. The above change fixes it, allowing me to use a custom $SpaceWikiWordsFunction, without affecting standard sites. There may be a better solution, but the above is simple and mostly harmless.
Instead of the above approach (which should work fine), I just modified scripts/trails.php so that it correctly uses the original markup on the trail page rather than switching "WikiWord
" to "[[WikiWord]]
". As a result, all of the standard markup rules (including AsSpaced) apply to the WikiWord as normal.
--Pm