From 0823d36cd6704a067d6939635dc02c31d469db53 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 30 Jun 2014 07:46:03 +0000 Subject: [PATCH] markdown : correct partial testTitleSharp : removing unwanted ending space git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1504 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- markdown.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/markdown.php b/markdown.php index aa49295..7997542 100644 --- a/markdown.php +++ b/markdown.php @@ -94,22 +94,22 @@ class markdown // TITLES // Titles ATX (Optionnal sharp at the end) // ###### Title6 - $search[] = "/^###### (.+)(#*)$/Um"; + $search[] = "/^###### (.+)( +#*)$/Um"; $replace[] = "

\n
\\1
\n

"; // ##### Title5 - $search[] = "/^##### (.+)(#*)$/Um"; + $search[] = "/^##### (.+)( +#*)$/Um"; $replace[] = "

\n
\\1
\n

"; // #### Title4 - $search[] = "/^#### (.+)(#*)$/Um"; + $search[] = "/^#### (.+)( +#*)$/Um"; $replace[] = "

\n

\\1

\n

"; // ### Title3 - $search[] = "/^### (.+)(#*)$/Um"; + $search[] = "/^### (.+)( +#*)$/Um"; $replace[] = "

\n

\\1

\n

"; // ## Title2 - $search[] = "/^## (.+)(#*)$/Um"; + $search[] = "/^## (.+)( +#*)$/Um"; $replace[] = "

\n

\\1

\n

"; // # Title1 - $search[] = "/^# (.+)(#*)$/Um"; + $search[] = "/^# (.+)( +#*)$/Um"; $replace[] = "

\n

\\1

\n

"; // End of line with double space :
$search[] = "/( )$/Um"; $replace[] = "
";