From: <var...@us...> - 2009-07-07 20:05:03
|
Revision: 7006 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7006&view=rev Author: vargenau Date: 2009-07-07 20:04:52 +0000 (Tue, 07 Jul 2009) Log Message: ----------- Implement Mediawiki <nowiki> Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2009-07-07 12:20:11 UTC (rev 7005) +++ trunk/lib/InlineParser.php 2009-07-07 20:04:52 UTC (rev 7006) @@ -976,6 +976,20 @@ } /** + * Mediawiki <nowiki> + * <nowiki>...</nowiki> + */ +class Markup_nowiki extends SimpleMarkup +{ + var $_match_regexp = '<nowiki>.*?<\/nowiki>'; + + function markup ($match) { + // Remove <nowiki> and </nowiki> + return HTML::raw(substr($match, 8, -9)); + } +} + +/** * Wikicreole preformatted * {{{ * }}} @@ -1137,6 +1151,7 @@ $class = "Markup_$mtype"; $this->_addMarkup(new $class); } + $this->_addMarkup(new Markup_nowiki); if (ENABLE_MARKUP_DIVSPAN and !$non_default) $this->_addMarkup(new Markup_html_divspan); if (ENABLE_MARKUP_COLOR and !$non_default) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |