From a6755281caf089bc0d12d715100b727bc97aa8da Mon Sep 17 00:00:00 2001 From: andi Date: Fri, 20 May 2005 17:07:02 +0200 Subject: small fixes for linkparsing #337 #339 darcs-hash:20050520150702-9977f-a2ef5264ff38a5225521c83eeaf85759c92a37bb.gz --- inc/parser/handler.php | 14 +++++++------- inc/parser/parser.php | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'inc/parser') diff --git a/inc/parser/handler.php b/inc/parser/handler.php index 2379d60ff..d2d201282 100644 --- a/inc/parser/handler.php +++ b/inc/parser/handler.php @@ -402,13 +402,6 @@ class Doku_Handler { array($link[0],$link[1]), $pos ); - }elseif ( preg_match('#([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i',$link[0]) ) { - // E-Mail - $this->_addCall( - 'emaillink', - array($link[0],$link[1]), - $pos - ); }elseif ( preg_match('#^([a-z0-9]+?)://#i',$link[0]) ) { // external link (accepts all protocols) $this->_addCall( @@ -416,6 +409,13 @@ class Doku_Handler { array($link[0],$link[1]), $pos ); + }elseif ( preg_match('#([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i',$link[0]) ) { + // E-Mail + $this->_addCall( + 'emaillink', + array($link[0],$link[1]), + $pos + ); }elseif ( preg_match('!^#.+!',$link[0]) ){ // local link $this->_addCall( diff --git a/inc/parser/parser.php b/inc/parser/parser.php index 87a29328c..f1a10fb00 100644 --- a/inc/parser/parser.php +++ b/inc/parser/parser.php @@ -707,7 +707,7 @@ class Doku_Parser_Mode_InternalLink extends Doku_Parser_Mode { function connectTo($mode) { // Word boundaries? - $this->Lexer->addSpecialPattern("\[\[[^\]]+?\]\]",$mode,'internallink'); + $this->Lexer->addSpecialPattern("\[\[.+?\]\]",$mode,'internallink'); } } -- cgit v1.2.3