Have the optional code_block_content_func only replace htmlspecialchars.
This commit is contained in:
parent
1df2655b8b
commit
eb2a0e012c
1 changed files with 2 additions and 2 deletions
|
|
@ -1324,10 +1324,10 @@ class MarkdownExtra extends \Michelf\Markdown {
|
|||
|
||||
if ($this->code_block_content_func) {
|
||||
$codeblock = call_user_func($this->code_block_content_func, $codeblock, $classname);
|
||||
return "\n\n".$this->hashBlock($codeblock)."\n\n";
|
||||
} else {
|
||||
$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
|
||||
}
|
||||
|
||||
$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
|
||||
$codeblock = preg_replace_callback('/^\n+/',
|
||||
array($this, '_doFencedCodeBlocks_newlines'), $codeblock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue