Merge pull request #48 from tamirvs/feat-images-option

Added the option to disable images
This commit is contained in:
Alex Demchenko 2014-02-14 14:21:24 +02:00
commit 3308507fbc
3 changed files with 6 additions and 0 deletions

View file

@ -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']);
}

View file

@ -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,

View file

@ -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,