diff options
author | Chris Smith <chris.eureka@jalakai.co.uk> | 2008-03-13 21:39:50 +0100 |
---|---|---|
committer | Chris Smith <chris.eureka@jalakai.co.uk> | 2008-03-13 21:39:50 +0100 |
commit | 93a34bf33e9f8f0649d38e94d18cbba2a11fd651 (patch) | |
tree | f39c3105eeb770cfabf635f40c7665644396a666 /inc/parser/handler.php | |
parent | fa05a45fcd44c7aeb76c67a197983c40b809cef6 (diff) | |
download | rpg-93a34bf33e9f8f0649d38e94d18cbba2a11fd651.tar.gz rpg-93a34bf33e9f8f0649d38e94d18cbba2a11fd651.tar.bz2 |
update preformatted syntax mode to ignore entire blocks of white space
This patch only updates the actual "preformatted" syntax mode, that is
only preformatted blocks caused by leading blanks on a line. If the entire
block is empty, it is ignored. ie. if a block of preformatted text has
leading or trailing empty lines and some non-empty lines, the leading and
trailing content are preserved.
darcs-hash:20080313203950-f07c6-9d0745b157e45b61b06ff0c7d85bec8558946c1e.gz
Diffstat (limited to 'inc/parser/handler.php')
-rw-r--r-- | inc/parser/handler.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 9f158e4a8..b36fd142b 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -1047,7 +1047,9 @@ class Doku_Handler_Preformatted { $this->text .= $call[1][0]; break; case 'preformatted_end': - $this->CallWriter->writeCall(array('preformatted',array($this->text),$this->pos)); + if (trim($this->text)) { + $this->CallWriter->writeCall(array('preformatted',array($this->text),$this->pos)); + } break; } } |