summaryrefslogtreecommitdiff
path: root/inc/parser/parser.php
diff options
context:
space:
mode:
authorStephane Chazelas <stephane@artesyncp.com>2007-02-06 20:16:29 +0100
committerStephane Chazelas <stephane@artesyncp.com>2007-02-06 20:16:29 +0100
commitd4834a196d241d8a5278e6a2cb24f88659f5f2fc (patch)
tree6c62724c8d1cecd075fa4fb74dce4ebdeed78ab1 /inc/parser/parser.php
parentde11706137cf18bf91e56e8751f79b55eee1d0d8 (diff)
downloadrpg-d4834a196d241d8a5278e6a2cb24f88659f5f2fc.tar.gz
rpg-d4834a196d241d8a5278e6a2cb24f88659f5f2fc.tar.bz2
do preconnects only once #1067
darcs-hash:20070206191629-64c10-6607d7e7e724315b728e8c46a0b2ff6e7e8ab2f6.gz
Diffstat (limited to 'inc/parser/parser.php')
-rw-r--r--inc/parser/parser.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index 3be908103..0d88580d2 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -644,7 +644,7 @@ class Doku_Parser_Mode_smiley extends Doku_Parser_Mode {
}
function preConnect() {
- if(!count($this->smileys)) return;
+ if(!count($this->smileys) || $this->pattern != '') return;
$sep = '';
foreach ( $this->smileys as $smiley ) {
@@ -678,7 +678,7 @@ class Doku_Parser_Mode_wordblock extends Doku_Parser_Mode {
function preConnect() {
- if ( count($this->badwords) == 0 ) {
+ if ( count($this->badwords) == 0 || $this->pattern != '') {
return;
}
@@ -715,7 +715,7 @@ class Doku_Parser_Mode_entity extends Doku_Parser_Mode {
}
function preConnect() {
- if(!count($this->entities)) return;
+ if(!count($this->entities) || $this->pattern != '') return;
$sep = '';
foreach ( $this->entities as $entity ) {
@@ -837,6 +837,7 @@ class Doku_Parser_Mode_externallink extends Doku_Parser_Mode {
var $patterns = array();
function preConnect() {
+ if(count($this->patterns)) return;
$ltrs = '\w';
$gunk = '/\#~:.?+=&%@!\-';
@@ -854,6 +855,7 @@ class Doku_Parser_Mode_externallink extends Doku_Parser_Mode {
}
function connectTo($mode) {
+
foreach ( $this->patterns as $pattern ) {
$this->Lexer->addSpecialPattern($pattern,$mode,'externallink');
}