diff --git a/Parser/MarkdownParser.php b/Parser/MarkdownParser.php index a09e2fa..92574e2 100644 --- a/Parser/MarkdownParser.php +++ b/Parser/MarkdownParser.php @@ -31,6 +31,7 @@ class MarkdownParser extends MarkdownExtraParser implements MarkdownParserInterf 'inline_link' => true, // [link text](url "optional title") 'reference_link' => true, // [link text] [id] 'shortcut_link' => true, // [link text] + 'images' => true, 'block_quote' => true, 'code_block' => true, 'html_block' => true, @@ -88,6 +89,9 @@ class MarkdownParser extends MarkdownExtraParser implements MarkdownParserInterf if (!$this->features['reference_link']) { unset($this->document_gamut['stripLinkDefinitions']); } + if (!$this->features['images']) { + unset($this->span_gamut['doImages']); + } if (!$this->features['block_quote']) { unset($this->block_gamut['doBlockQuotes']); } diff --git a/Parser/Preset/Light.php b/Parser/Preset/Light.php index 603f920..aac1b95 100644 --- a/Parser/Preset/Light.php +++ b/Parser/Preset/Light.php @@ -24,6 +24,7 @@ class Light extends MarkdownParser 'inline_link' => true, // [link text](url "optional title") 'reference_link' => true, // [link text] [id] 'shortcut_link' => false, // [link text] + 'images' => true, 'html_block' => false, 'block_quote' => false, 'code_block' => false, diff --git a/Parser/Preset/Medium.php b/Parser/Preset/Medium.php index d47ba7a..3de4d1e 100644 --- a/Parser/Preset/Medium.php +++ b/Parser/Preset/Medium.php @@ -24,6 +24,7 @@ class Medium extends MarkdownParser 'inline_link' => true, // [link text](url "optional title") 'reference_link' => true, // [link text] [id] 'shortcut_link' => true, // [link text] + 'images' => true, 'html_block' => false, 'block_quote' => false, 'code_block' => true,