markdown : correct partial testTitleSharp : removing unwanted ending space

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1504 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-06-30 07:46:03 +00:00
parent a404db66d8
commit 0823d36cd6

View File

@@ -94,22 +94,22 @@ class markdown
// TITLES
// Titles ATX (Optionnal sharp at the end)
// ###### Title6
$search[] = "/^###### (.+)(#*)$/Um";
$search[] = "/^###### (.+)( +#*)$/Um";
$replace[] = "</p>\n<h6>\\1</h6>\n<p>";
// ##### Title5
$search[] = "/^##### (.+)(#*)$/Um";
$search[] = "/^##### (.+)( +#*)$/Um";
$replace[] = "</p>\n<h5>\\1</h5>\n<p>";
// #### Title4
$search[] = "/^#### (.+)(#*)$/Um";
$search[] = "/^#### (.+)( +#*)$/Um";
$replace[] = "</p>\n<h4>\\1</h4>\n<p>";
// ### Title3
$search[] = "/^### (.+)(#*)$/Um";
$search[] = "/^### (.+)( +#*)$/Um";
$replace[] = "</p>\n<h3>\\1</h3>\n<p>";
// ## Title2
$search[] = "/^## (.+)(#*)$/Um";
$search[] = "/^## (.+)( +#*)$/Um";
$replace[] = "</p>\n<h2>\\1</h2>\n<p>";
// # Title1
$search[] = "/^# (.+)(#*)$/Um";
$search[] = "/^# (.+)( +#*)$/Um";
$replace[] = "</p>\n<h1>\\1</h1>\n<p>";
// End of line with double space : <br/>
$search[] = "/( )$/Um"; $replace[] = "<br/>";