Permalink
Browse files

Parsedown update, introducing responsive images

  • Loading branch information...
1 parent 02aadf1 commit b4bc586b3cafec199ba93bbfb98f7efd97fe8eb6 @Wruczek committed Oct 25, 2016
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/parsedown/parsedown.php
@@ -515,6 +515,16 @@ protected function blockList($Line)
),
);
+ if($name === 'ol')
+ {
+ $listStart = stristr($matches[0], '.', true);
+
+ if($listStart !== '1')
+ {
+ $Block['element']['attributes'] = array('start' => $listStart);
+ }
+ }
+
$Block['li'] = array(
'name' => 'li',
'handler' => 'li',
@@ -1170,6 +1180,7 @@ protected function inlineImage($Excerpt)
'attributes' => array(
'src' => $Link['element']['attributes']['href'],
'alt' => $Link['element']['text'],
+ 'class' => 'img-responsive'
),
),
);

0 comments on commit b4bc586

Please sign in to comment.