Skip to content
Snippets Groups Projects
Commit 8e266198 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

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
parent 0cb422a2
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment