From 5a41afe6e3b958291893a0a10105cd41971fb141 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Sun, 1 Dec 2013 17:57:03 +0000 Subject: FS#1833 (b) Prevent table entry syntax swallowing multiple preceeding blank lines (a) this shouldn't be necessary, blank lines are handled by paragraph processing (b) avoids issues with greedy table syntax competing with plugins --- inc/parser/parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index e39a4daf5..1f14b98a3 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -454,8 +454,8 @@ class Doku_Parser_Mode_table extends Doku_Parser_Mode { } function connectTo($mode) { - $this->Lexer->addEntryPattern('\s*\n\^',$mode,'table'); - $this->Lexer->addEntryPattern('\s*\n\|',$mode,'table'); + $this->Lexer->addEntryPattern('[\t ]*\n\^',$mode,'table'); + $this->Lexer->addEntryPattern('[\t ]*\n\|',$mode,'table'); } function postConnect() { -- cgit v1.2.3 From 8cc41db0f42cbb8028c05720e98b98451463c403 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Wed, 8 Jan 2014 21:14:51 +0100 Subject: fix renderer:plugin() signature in 82d616353e4c3680d88f083eb6f88fe68de92904 we introduced passing the raw match for syntax plugins to the plugin method of the renderer. This was introduced for renderer plugins that might need access to the raw syntax (like the table editor or WYSIWYG plugins). However the function signature was never updated, making these additional parameter basically secret. With strict standard this throws errors. This patch fixes this. --- inc/parser/renderer.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/renderer.php b/inc/parser/renderer.php index c697e990c..e3401fd48 100644 --- a/inc/parser/renderer.php +++ b/inc/parser/renderer.php @@ -59,9 +59,15 @@ class Doku_Renderer extends DokuWiki_Plugin { return false; } - - //handle plugin rendering - function plugin($name,$data){ + /** + * handle plugin rendering + * + * @param string $name Plugin name + * @param mixed $data custom data set by handler + * @param string $state matched state if any + * @param string $match raw matched syntax + */ + function plugin($name,$data,$state='',$match=''){ $plugin = plugin_load('syntax',$name); if($plugin != null){ $plugin->render($this->getFormat(),$this,$data); -- cgit v1.2.3