[pmwiki-users] Markup question...

Patrick R. Michaud pmichaud at pobox.com
Mon Apr 2 08:54:11 CDT 2007


On Mon, Apr 02, 2007 at 05:40:43AM -0400, The Editor wrote:
> I have a simple markup I'm using to show Snippets code easily, and it
> works fine except I can't seem to get the >>box<< to process.
> 
> Markup('ZAPshow', '_begin', '/\(:show (.*?):\\)/',
> 	">>box<<
> Examples: [[$1]](:input form:)(:textarea name=test rows=10
> cols=50:){(source $1#ID)}
> >><<");
> 
> Can anyone explain the secret to this?

Sure.  In a markup rule, it would be "&gt;&gt;box&lt;&lt" instead of ">>box<<"
(because angle brackets are converted to HTML entities at the start of
markup processing).

Also note that in order for >><< markups to work they have to be at the beginning of
a line (this might not be true in the above if "(:show ...:) isn't at
the beginning of a line).

Lastly, it might not be a good idea to put this markup rule at '_begin',
because it means that any [=...=] or [@...@] markups containing (:show:)
won't be processed correctly.  I'd pick a slightly later "when" target.

Pm



More information about the pmwiki-users mailing list