summaryrefslogtreecommitdiff
path: root/inc/parser
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-03-24 11:36:15 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-03-24 11:36:15 +0100
commitce4ad3caffccc841833fa6cb4b46478617e44d64 (patch)
tree44aa01e1f96cc4092b3312ceca47dff232c38c56 /inc/parser
parent4d39a94820a3ecdfc96d36f0dd421a6bb78a1135 (diff)
parente950d12fe605bb70cca7a030eab49f5e29719f0b (diff)
downloadrpg-ce4ad3caffccc841833fa6cb4b46478617e44d64.tar.gz
rpg-ce4ad3caffccc841833fa6cb4b46478617e44d64.tar.bz2
Merge pull request #612 from splitbrain/improve_double_quote_matching
improvements to double quote matching
Diffstat (limited to 'inc/parser')
-rw-r--r--inc/parser/handler.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/inc/parser/handler.php b/inc/parser/handler.php
index 8ae991209..dfaf1adaa 100644
--- a/inc/parser/handler.php
+++ b/inc/parser/handler.php
@@ -12,6 +12,7 @@ class Doku_Handler {
var $status = array(
'section' => false,
+ 'doublequote' => 0,
);
var $rewriteBlocks = true;
@@ -401,11 +402,17 @@ class Doku_Handler {
function doublequoteopening($match, $state, $pos) {
$this->_addCall('doublequoteopening',array(), $pos);
+ $this->status['doublequote']++;
return true;
}
function doublequoteclosing($match, $state, $pos) {
- $this->_addCall('doublequoteclosing',array(), $pos);
+ if ($this->status['doublequote'] <= 0) {
+ $this->doublequoteopening($match, $state, $pos);
+ } else {
+ $this->_addCall('doublequoteclosing',array(), $pos);
+ $this->status['doublequote'] = max(0, --$this->status['doublequote']);
+ }
return true;
}