diff options
-rw-r--r-- | inc/parser/handler.php | 1 | ||||
-rw-r--r-- | lib/plugins/syntax.php | 27 |
2 files changed, 27 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 6b9dc9b3c..72f6de490 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -80,6 +80,7 @@ class Doku_Handler { $data = array($match); $plugin =& plugin_load('syntax',$pluginname); if($plugin != null){ + $plugin->setMatch($match); $data = $plugin->handle($match, $state, $pos, $this); } if ($data !== false) { diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php index 7ded173cd..c3d659456 100644 --- a/lib/plugins/syntax.php +++ b/lib/plugins/syntax.php @@ -22,7 +22,8 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { var $lang = array(); // array to hold language dependent strings, best accessed via ->getLang() var $configloaded = false; // set to true by loadConfig() after loading plugin configuration variables var $conf = array(); // array to hold plugin settings, best accessed via ->getConf() - + var $match = null; // string containing the match of a syntax plugin, accessed via + // it's setters and getters setMatch() and getMatch() /** * General Info * @@ -266,5 +267,29 @@ class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { return $conf; } + /** + * setMatch is the setter of the match string in a syntax plugin + * + * @author Pierre Spring <pierre.spring@liip.ch> + * @param string $match + * @access public + * @return void + */ + function setMatch($match) + { + $this->match = (string) $match; + } + /** + * getMatch is the getter of the match string in a syntax plugin + * + * @author Pierre Spring <pierre.spring@liip.ch> + * @access public + * @return string + */ + function getMatch() + { + return $this->match; + } + } //Setup VIM: ex: et ts=4 enc=utf-8 : |