From f4b3aca3e7d131ff1d87cbe60e231cc61e640da8 Mon Sep 17 00:00:00 2001
From: Harry Fuecks <hfuecks@gmail.com>
Date: Sat, 6 Aug 2005 17:12:04 +0200
Subject: [PATCH] Alternative fix for #384

The bug with emphasis syntax clashing with URLs did still occur with
protocols different from http or ftp. This patch might be a better
solution.

I had to use [^\x00]* instead of .* - for some reason the later won't
work properly in this case. It means people won't be able to use ASCII
NUL characters inside an emphasis.

The other thing that won't work is this;

Won't work: //semi colon here>://

People will need to make sure there is at least a space - this will work;

Works //semi colon here>: //

darcs-hash:20050806151204-56ad0-532806af57801f5fa4536add32175089e625a0d4.gz
---
 inc/parser/parser.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/parser/parser.php b/inc/parser/parser.php
index b1cae471d..991031a30 100644
--- a/inc/parser/parser.php
+++ b/inc/parser/parser.php
@@ -321,7 +321,7 @@ class Doku_Parser_Mode_formatting extends Doku_Parser_Mode {
             ),
         
         'emphasis'=> array (
-            'entry'=>'//(?=.*(?<!http:|ftp:)//)', //hack for bug #384
+            'entry'=>'//(?=[^\x00]*[^:]//)', //hack for bug #384 
             'exit'=>'//',
             'sort'=>80
             ),
-- 
GitLab