mirror of
https://github.com/KnpLabs/KnpMarkdownBundle.git
synced 2024-06-02 14:02:18 +02:00
Merge pull request #48 from tamirvs/feat-images-option
Added the option to disable images
This commit is contained in:
commit
3308507fbc
|
@ -31,6 +31,7 @@ class MarkdownParser extends MarkdownExtraParser implements MarkdownParserInterf
|
||||||
'inline_link' => true, // [link text](url "optional title")
|
'inline_link' => true, // [link text](url "optional title")
|
||||||
'reference_link' => true, // [link text] [id]
|
'reference_link' => true, // [link text] [id]
|
||||||
'shortcut_link' => true, // [link text]
|
'shortcut_link' => true, // [link text]
|
||||||
|
'images' => true,
|
||||||
'block_quote' => true,
|
'block_quote' => true,
|
||||||
'code_block' => true,
|
'code_block' => true,
|
||||||
'html_block' => true,
|
'html_block' => true,
|
||||||
|
@ -88,6 +89,9 @@ class MarkdownParser extends MarkdownExtraParser implements MarkdownParserInterf
|
||||||
if (!$this->features['reference_link']) {
|
if (!$this->features['reference_link']) {
|
||||||
unset($this->document_gamut['stripLinkDefinitions']);
|
unset($this->document_gamut['stripLinkDefinitions']);
|
||||||
}
|
}
|
||||||
|
if (!$this->features['images']) {
|
||||||
|
unset($this->span_gamut['doImages']);
|
||||||
|
}
|
||||||
if (!$this->features['block_quote']) {
|
if (!$this->features['block_quote']) {
|
||||||
unset($this->block_gamut['doBlockQuotes']);
|
unset($this->block_gamut['doBlockQuotes']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,7 @@ class Light extends MarkdownParser
|
||||||
'inline_link' => true, // [link text](url "optional title")
|
'inline_link' => true, // [link text](url "optional title")
|
||||||
'reference_link' => true, // [link text] [id]
|
'reference_link' => true, // [link text] [id]
|
||||||
'shortcut_link' => false, // [link text]
|
'shortcut_link' => false, // [link text]
|
||||||
|
'images' => true,
|
||||||
'html_block' => false,
|
'html_block' => false,
|
||||||
'block_quote' => false,
|
'block_quote' => false,
|
||||||
'code_block' => false,
|
'code_block' => false,
|
||||||
|
|
|
@ -24,6 +24,7 @@ class Medium extends MarkdownParser
|
||||||
'inline_link' => true, // [link text](url "optional title")
|
'inline_link' => true, // [link text](url "optional title")
|
||||||
'reference_link' => true, // [link text] [id]
|
'reference_link' => true, // [link text] [id]
|
||||||
'shortcut_link' => true, // [link text]
|
'shortcut_link' => true, // [link text]
|
||||||
|
'images' => true,
|
||||||
'html_block' => false,
|
'html_block' => false,
|
||||||
'block_quote' => false,
|
'block_quote' => false,
|
||||||
'code_block' => true,
|
'code_block' => true,
|
||||||
|
|
Loading…
Reference in a new issue