From e3776c06c37cc197709dac60892604dfea894ac2 Mon Sep 17 00:00:00 2001 From: Michael Hamann Date: Mon, 29 Nov 2010 01:34:36 +0100 Subject: Remove enc=utf-8 in VIM modeline as it is not allowed in VIM 7.3 As of VIM 7.3 it is no longer possible to specify the encoding in the modeline. This gives an error message whenever such a file is opened, thus this commit removes the enc setting from the modeline. --- inc/parser/parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/parser/parser.php') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 20f0e6ca3..2e6b7791a 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -957,4 +957,4 @@ class Doku_Parser_Mode_emaillink extends Doku_Parser_Mode { } -//Setup VIM: ex: et ts=4 enc=utf-8 : +//Setup VIM: ex: et ts=4 : -- cgit v1.2.3 From 9fa736b0317d46fdfb2025895fa0288fd736ca08 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 7 Dec 2010 16:09:01 +0100 Subject: Make baseonly work in allowedModes This makes it possible to have modes that do accept headers (baseonly) in the parser. Related test cases are still running through but I'm not 100% sure I did not break something here. So it should be tested a bit more. This patch will allow plugins to wrap multiple sections, however it also makes it possible to easily break XHTML validity, because headers also open and close sections, so plugin authors need to be aware! In case you wonder: this patch is not about allowing formatting inside headers. --- inc/parser/parser.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc/parser/parser.php') diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 2e6b7791a..b93760f3a 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -90,7 +90,6 @@ class Doku_Parser { if ( $mode == 'base' ) { continue; } - $this->modes[$mode]->preConnect(); foreach ( array_keys($this->modes) as $cm ) { @@ -218,11 +217,11 @@ class Doku_Parser_Mode_footnote extends Doku_Parser_Mode { //------------------------------------------------------------------- class Doku_Parser_Mode_header extends Doku_Parser_Mode { - function preConnect() { + function connectTo($mode) { //we're not picky about the closing ones, two are enough $this->Lexer->addSpecialPattern( '[ \t]*={2,}[^\n]+={2,}[ \t]*(?=\n)', - 'base', + $mode, 'header' ); } -- cgit v1.2.3