FIX Markdown - headers
This commit is contained in:
parent
ccbf28cf07
commit
bb152d028b
|
|
@ -17,16 +17,16 @@ class Markdown
|
||||||
|
|
||||||
static private function replaceHeaders($string)
|
static private function replaceHeaders($string)
|
||||||
{
|
{
|
||||||
$pr = '(^#{1} (.{1,}))';
|
$pr = '(### (.{1,}))';
|
||||||
$rep = '<h2>$1</h2>';
|
$rep = '<h4>$1</h4>';
|
||||||
$string = preg_replace($pr, $rep, $string);
|
$string = preg_replace($pr, $rep, $string);
|
||||||
|
|
||||||
$pr = '(^#{2} (.{1,}))';
|
$pr = '(## (.{1,}))';
|
||||||
$rep = '<h3>$1</h3>';
|
$rep = '<h3>$1</h3>';
|
||||||
$string = preg_replace($pr, $rep, $string);
|
$string = preg_replace($pr, $rep, $string);
|
||||||
|
|
||||||
$pr = '(^#{3} (.{1,}))';
|
$pr = '(# (.{1,}))';
|
||||||
$rep = '<h4>$1</h4>';
|
$rep = '<h2>$1</h2>';
|
||||||
$string = preg_replace($pr, $rep, $string);
|
$string = preg_replace($pr, $rep, $string);
|
||||||
|
|
||||||
return $string;
|
return $string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue