[Pmwiki-users] Markup to prevent parsing of indented(PRE) text

Patrick R. Michaud pmichaud
Mon Nov 1 12:22:12 CST 2004


On Mon, Nov 01, 2004 at 06:38:42PM +0000, Val Sharp wrote:
> I was surprised to discover that indented text (i.e. rendered as a 
> <pre> element) is still being parsed for PmWiki markup, so I had a go 
> at creating something to prevent that:
> 
>   Markup('^ [=','<\\r','/^ (.*?)$/',' [=$1=]');
> 
> It seems to do the job, but since I'm new to PmWiki and php reg 
> expressions, etc, I just thought I'd check it's not likely to have any 
> unforeseen consequences.

If you just want to disable the "spaces-at-beginning-of-line generate <pre>
text", you can do it with 

   Markup('^ ','block');

The lack of a pattern & replacement parameters indicates that you simply
wish to disable the markup named by '^ ' (which is the space-at-beginning-
of-line markup defined in scripts/stdmarkup.php).  One can do this
to disable almost any of PmWiki's individual markups.

Pm



More information about the pmwiki-users mailing list