From: <rob...@us...> - 2012-11-27 18:00:34
|
Revision: 44098 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=44098&view=rev Author: robertplummer Date: 2012-11-27 18:00:23 +0000 (Tue, 27 Nov 2012) Log Message: ----------- [FIX] Move BOF (beginning of file) character out of the Jison parser and into the parser instantiator Modified Paths: -------------- trunk/lib/core/JisonParser/WikiCKEditor/Handler.php trunk/lib/parser/parserlib.php Modified: trunk/lib/core/JisonParser/WikiCKEditor/Handler.php =================================================================== --- trunk/lib/core/JisonParser/WikiCKEditor/Handler.php 2012-11-27 17:59:03 UTC (rev 44097) +++ trunk/lib/core/JisonParser/WikiCKEditor/Handler.php 2012-11-27 18:00:23 UTC (rev 44098) @@ -65,15 +65,6 @@ parent::setOption($option); } - public function postParse(&$output) - { - //ckeditor inserts an element at the beginning, which confuses the conversion back to wiki from html, this is to prevent that from happening - if ($this->Parser->parseDepth == 0) { - $output = $this->createWikiHelper('BOF', 'span', '­', array('contenteditable'=>'false')) . $output; - } - parent::postParse($output); - } - //end state handlers //Wiki Syntax Objects Parsing Start /** Modified: trunk/lib/parser/parserlib.php =================================================================== --- trunk/lib/parser/parserlib.php 2012-11-27 17:59:03 UTC (rev 44097) +++ trunk/lib/parser/parserlib.php 2012-11-27 18:00:23 UTC (rev 44098) @@ -1476,8 +1476,13 @@ if ($prefs['feature_jison_wiki_parser'] == 'y') {//The following will stop and return based off new parser //Testing new parser ;) + $BOF = ''; if ($this->option['ck_editor']) { $parser = new JisonParser_WikiCKEditor_Handler(); + //ckeditor inserts an element at the beginning, which confuses the conversion back to wiki from html, this is to prevent that from happening + if ($this->Parser->parseDepth == 0) { + $BOF = $parser->createWikiHelper('BOF', 'span', '­', array('contenteditable'=>'false')); + } } else { $parser = new JisonParser_Wiki_Handler(); } @@ -1489,7 +1494,7 @@ } unset($parser); - return $data; + return $BOF . $data; } // if simple_wiki is true, disable some wiki syntax This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |