From: <var...@us...> - 2014-11-20 17:49:56
|
Revision: 9352 http://sourceforge.net/p/phpwiki/code/9352 Author: vargenau Date: 2014-11-20 17:49:49 +0000 (Thu, 20 Nov 2014) Log Message: ----------- Remove Markup_xml_plugin Modified Paths: -------------- trunk/lib/InlineParser.php Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2014-11-20 17:47:06 UTC (rev 9351) +++ trunk/lib/InlineParser.php 2014-11-20 17:49:49 UTC (rev 9352) @@ -1001,47 +1001,6 @@ } } -// Special version for plugins in xml syntax, mediawiki-style -// <name arg=value>body</name> or <name /> => < ? plugin pluginname arg=value body ? > -// PLUGIN_MARKUP_MAP = "html:RawHtml dot:GraphViz toc:CreateToc amath:AsciiMath richtable:RichTable include:IncludePage tex:TexToPng" -class Markup_xml_plugin extends BalancedMarkup -{ - //public $_start_regexp = "<(?: ".join('|',PLUGIN_MARKUP_MAP)." )(?: \s[^>]*)>"; - - function getStartRegexp() - { - global $PLUGIN_MARKUP_MAP; - static $_start_regexp; - if ($_start_regexp) return $_start_regexp; - if (empty($PLUGIN_MARKUP_MAP)) return ''; - //"<(?: html|search|extsearch|dot|toc|math|richtable|include|tex )(?: \s[^>]*)>" - $_start_regexp = "<(?: " . join('|', array_keys($PLUGIN_MARKUP_MAP)) . " )(?: \s[^>]*|\\/ )>"; - return $_start_regexp; - } - - function getEndRegexp($match) - { - return "<\\/" . $match . '>'; - } - - function markup($match, $body) - { - global $PLUGIN_MARKUP_MAP; - $name = substr($match, 2, -2); - $vars = ''; - if (preg_match('/^(\S+)\|(.*)$/', $name, $_m)) { - $name = $_m[1]; - $vars = $_m[2]; //str_replace(' ', '&', $_m[2]); - } - if (!isset($PLUGIN_MARKUP_MAP[$name])) { - trigger_error("No plugin for $name $vars defined.", E_USER_WARNING); - return ""; - } - $plugin = $PLUGIN_MARKUP_MAP[$name]; - return new Cached_PluginInvocation("<" . "?plugin $plugin $vars $body ?" . ">"); - } -} - /** * Mediawiki <nowiki> * <nowiki>...</nowiki> @@ -1283,9 +1242,6 @@ $this->_addMarkup(new Markup_wikicreole_preformatted); if (ENABLE_MARKUP_TEMPLATE and !$non_default) $this->_addMarkup(new Markup_template_plugin); - // This does not work yet - if (PLUGIN_MARKUP_MAP and !$non_default) - $this->_addMarkup(new Markup_xml_plugin); } function _addMarkup($markup) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |