summaryrefslogtreecommitdiff
path: root/inc/parser/parser.php
diff options
context:
space:
mode:
authorChris Smith <chris.eureka@jalakai.co.uk>2009-10-04 21:03:59 +0200
committerChris Smith <chris.eureka@jalakai.co.uk>2009-10-04 21:03:59 +0200
commit95c19ce72a4d462308773332faf20b9c3b12db8f (patch)
tree91757bd75ad6eb6e43abec4359b57c802efd884a /inc/parser/parser.php
parent645c0a36b9beccc8b53de1decdef4082806f8093 (diff)
downloadrpg-95c19ce72a4d462308773332faf20b9c3b12db8f.tar.gz
rpg-95c19ce72a4d462308773332faf20b9c3b12db8f.tar.bz2
FS#1652, #FS1699
Ignore-this: b30b4a3061ad7a485012f6fd55cdfc78 This patch fixes problems with blank lines which contain whitespace before EOL. It also fixes an issue with preformatted syntax mode not triggering following p_open instructions under some circumstances. Note: The fix can result in swallowing of non-eol white space that precedes the EOL. This can happen when there is no non-whitespace CDATA between the end of the previous syntax mode and the EOL character. darcs-hash:20091004190359-f07c6-36bb418cb9be8bbaff741b4cbe135c442d0bde81.gz
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r--inc/parser/parser.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index ba62af21e..77909a436 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -276,7 +276,8 @@ class Doku_Parser_Mode_eol extends Doku_Parser_Mode {
if ( in_array($mode, $badModes) ) {
return;
}
- $this->Lexer->addSpecialPattern('\n',$mode,'eol');
+ // see FS#1652, pattern extended to swallow preceding whitespace to avoid issues with lines that only contain whitespace
+ $this->Lexer->addSpecialPattern('(?:^[ \t]*)?\n',$mode,'eol');
}
function getSort() {