[pmwiki-users] styles in customMarkup

Simon nzskiwi at gmail.com
Sat Feb 6 00:34:11 CST 2010


On 25 January 2010 06:05, Petko Yotov <5ko at 5ko.fr> wrote:

> On Sunday 24 January 2010 15:04:05, Walter Keller wrote :
> >     Markup('mRed', '>^>><<', '/{mRed\+}/', '>>color=red<<');
> > then then the formatting is not honoured, just the text expanded to
> > <<color ....
> > To make it work you need the clumsy definition
> >     Markup('mBlue', '>^>><<', '/{mBlue\+}/',
> '&gt;&gt;color=blue&lt;&lt;');
> >
> > This is neither intuitive nor documented! It took me quite a time to
> > find out. At least it would also work for text variables.
>
> Feel free to document it on pmwiki.org on the pages where you think it
> should
> be documented -- this may be helpful to other users. Thanks in advance.
>
> > Could you fix pmWiki, such that '>>color=red<<' would work?
>
> No. PmWiki converts the wiki-text to HTML which uses a lot the characters <
> and >. In order not to mess with what it already processed to HTML, PmWiki
> converts those characters < and > from the wiki source to the entities &lt;
> and &gt;, and uses them when the page markup is processed. So it is
> correct,
> if you define new markup rules containing < and >, which are not native
> HTML
> but should be re-processed by PmWiki, you should use &lt; and &gt;.
>
> Thanks,
> Petko
>
> P.S. If your use of the {mBlue} markup is really as simple as your example,
> you know you can use the built-in %red% and %blue% command to change the
> text
> to red and to blue.
>

Possibly this is related to http://www.pmwiki.org/wiki/PITS/00962
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100206/702b4b72/attachment.html 


More information about the pmwiki-users mailing list