[Pmwiki-users] Highlighting <?php?
Patrick R. Michaud
pmichaud
Thu Mar 4 08:41:00 CST 2004
On Thu, Mar 04, 2004 at 04:15:32PM +0100, Thomas -Balu- Walter wrote:
> While talking about highlight_file() lately I thought it might be a nice
> idea to be able to highlight inline PHP code in the wiki. To do so we
> could use highlight_string(), but as usual we need the markup to mark
> those.
>
> Another idea would be to use the <?php ?> as highlight-markup.
> Any thoughts on this?
Using <?php...?> as the markup is obviously the most natural. This
can be done in PmWiki 0.6.9 as a local customization...
$BrowseDirectives['/(<\\?php\\s.*?\\?\\>)/es'] =
"Keep(highlight_string(str_replace('\\\"','\"','$1'),TRUE))";
See http://www.pmichaud.com/wiki/Development/PHPMarkup for a demo.
Pm
More information about the pmwiki-users
mailing list