home » zplus/freepost.git
Author zPlus <-> 2017-03-28 09:10:01
Committer zPlus <-> 2017-03-28 09:10:01
Commit a79838a (patch)
Tree 54c9bc8
Parent(s)

Update Parsedown


commits diff: 82ec0d0..a79838a
1 file changed, 13 insertions, 3 deletionsdownload


Diffstat
-rw-r--r-- parsedown.php 16

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+13/-3 M   parsedown.php
index 646af86..20863a7
old size: 37K - new size: 37K
@@ -448,7 +448,7 @@ class Parsedown
448 448 return $Block;
449 449 }
450 450
451 - $Block['element']['text']['text'] .= "\n".$Line['body'];;
451 + $Block['element']['text']['text'] .= "\n".$Line['body'];
452 452
453 453 return $Block;
454 454 }
@@ -515,6 +515,16 @@ class Parsedown
515 515 ),
516 516 );
517 517
518 + if($name === 'ol')
519 + {
520 + $listStart = stristr($matches[0], '.', true);
521 +
522 + if($listStart !== '1')
523 + {
524 + $Block['element']['attributes'] = array('start' => $listStart);
525 + }
526 + }
527 +
518 528 $Block['li'] = array(
519 529 'name' => 'li',
520 530 'handler' => 'li',
@@ -1194,7 +1204,7 @@ class Parsedown
1194 1204
1195 1205 $remainder = $Excerpt['text'];
1196 1206
1197 - if (preg_match('/\[((?:[^][]|(?R))*)\]/', $remainder, $matches))
1207 + if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches))
1198 1208 {
1199 1209 $Element['text'] = $matches[1];
1200 1210
@@ -1207,7 +1217,7 @@ class Parsedown
1207 1217 return;
1208 1218 }
1209 1219
1210 - if (preg_match('/^[(]((?:[^ ()]|[(][^ )]+[)])+)(?:[ ]+("[^"]*"|\'[^\']*\'))?[)]/', $remainder, $matches))
1220 + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches))
1211 1221 {
1212 1222 $Element['attributes']['href'] = $matches[1];
1213 1223