[pmwiki-users] Escape sequences bug?

Petko Yotov 5ko at 5ko.fr
Tue Dec 17 15:15:05 PST 2019


The markups ~~~ (user profile link) and ~~~~ (profile link and date, 
used for author signature in discussions) are different from other 
markups because they have to be replaced with what they mean when the 
page is saved.

Those are "Replace on save patterns" defined in the array $ROSPatterns. 
We also have $ROEPatterns, both are documented starting from here:

   https://www.pmwiki.org/wiki/PmWiki/EditVariables#ROEPatterns

Just below them there is the variable $EnableROSEscape, when enabled, 
ROS/ROE patterns are not processed inside the escape sequences. So you 
can add to config.php:

   $EnableROSEscape = 1;

It is a variable not enabled by default, because this was the default 
functionality for many years and people may have built recipes relying 
on it. Not only the author signatures, but custom uses of $ROEPatterns 
and $ROSPatterns.

I have added a link in TextFormattingRules to the variable entry.

In the PmWiki documentation, as we don't know if $EnableROSEscape is 
enabled, we split the pattern into 2 parts like ~~[==]~~ (null escape 
sequence) or [@~~@][@~~@] (enclosed twice).

Petko
-- 
If you upgrade :  http://www.pmwiki.org/Upgrades


On 17/12/2019 17:49, Robert Riebisch wrote:
> https://www.pmwiki.org/wiki/PmWiki/TextFormattingRules#EscapeSequence
> says:
> "Anything placed between [= and =] is not interpreted by PmWiki, but
> paragraphs are reformatted."
> 	and
> "For preformatted text blocks, use the [@...@] markup. It does neither
> reformat paragraphs nor process wiki markup:"
> 
> But putting:
> 	[=~~~=]\\
> 	[@~~~@]
> ("~" is used to underline some screen output from other software)
> to a page, gives me:
> 	[[~rr]]
> for preview and after saving.
> 
> IMHO this contradicts to "not interpreted" or "nor process wiki 
> markup".
> If it's not bug, but a feature, then I need workaround.



More information about the pmwiki-users mailing list