summaryrefslogtreecommitdiff
path: root/inc/parser/parser.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2005-09-14 16:48:10 +0200
committerAndreas Gohr <andi@splitbrain.org>2005-09-14 16:48:10 +0200
commit8e266198a9d66cbcd6289e616d0df216abcc1719 (patch)
treeba11ae5b5d8d8aa303ef1bbaa34d1ec3af6fdf44 /inc/parser/parser.php
parent0cb422a21416da0999421c4e3697cc074157d7a4 (diff)
downloadrpg-8e266198a9d66cbcd6289e616d0df216abcc1719.tar.gz
rpg-8e266198a9d66cbcd6289e616d0df216abcc1719.tar.bz2
fix for acronyms, but still buggy
The last change introduced a bug where acronyms inside words where marked. This fixes it partly. However there is still a bug - the following line gets both occurences of 'spec' marked as acronym and I don't know why: This is the specification also called spec. Only the last occurence of spec should be marked but both are. If the latter is missing the first one isn't marked as well. Any help appreciated. darcs-hash:20050914144810-7ad00-9e486e207cb856524a044a1d6d3ed07dbb534864.gz
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r--inc/parser/parser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 22f836709..9cc257c02 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -623,9 +623,9 @@ class Doku_Parser_Mode_acronym extends Doku_Parser_Mode {
}
function preConnect() {
- $bound = '[\x00-\x2f\x3a-\x3f\x5b-\x7f]';
+ $bound = '[\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]';
$acronyms = array_map('Doku_Lexer_Escape',$this->acronyms);
- $this->pattern = '(?<='.$bound.')(?:'.join('|',$acronyms).')(?='.$bound.')';
+ $this->pattern = '(?<=^|'.$bound.')(?:'.join('|',$acronyms).')(?='.$bound.')';
}
function connectTo($mode) {