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