On Thu, Feb 10, 2011 at 7:01 PM, Alexandre Leray <[email protected]> wrote:
> Here is what I have so far (without the class="lang" implemented yet):
>
> Markup("highlight", "fulltext",
> "/\\(:highlight:\\)(.*?)\\(:highlightend:\\)/s",
> "<pre><code>$1</code></pre>");
>
> The problem is that pmwiki processes the inner content of the block
Keep() is the key you're looking for -- it's an ingenious method for
preventing any other markup rules from operating over the text that
has been "kept". Try something like this:
> Markup("highlight", "fulltext",
> "/\\(:highlight:\s*(.*?)\\)(.*?)\\(:highlightend:\\)/s",
> keep("<pre><code class=\"$1\">$2</code></pre>"));
You might look at these pages for more help:
* http://www.pmwiki.org/wiki/PmWiki/CustomMarkupAlt
* http://www.pmwiki.org/wiki/PmWiki/CustomMarkup
-Peter
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users