From b6a8b728bd03e013b9ab77f27d741ff04667617e Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Tue, 23 Feb 2016 13:36:03 +0000 Subject: [PATCH] BUG Markdown : if an automatic URL have two underscores, the work and the URL is incorrect git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2546 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- markdown.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/markdown.php b/markdown.php index c93d4b1..4fea25d 100644 --- a/markdown.php +++ b/markdown.php @@ -87,6 +87,9 @@ class markdown $replace[] = "\\1"; $search[] = "#<(.+@.+)>#U"; $replace[] = "\\1"; + // The links must not allow the : redo the conversion + $search[] = "#(.*)(.*)(.*)#"; + $replace[] = "\\1_\\2_\\3_\\4_\\5"; // TODO : Links by reference : // Voici un petit texte écrit par [Michel Fortin][mf]. // [mf]: http://michelf.ca/ "Mon site web"