function MarkdownExtra_Parser::_doFencedCodeBlocks_callback in Markdown 5
Same name and namespace in other branches
- 6 markdown.php \MarkdownExtra_Parser::_doFencedCodeBlocks_callback()
File
- ./
markdown.php, line 2534
Class
Code
function _doFencedCodeBlocks_callback($matches) {
$codeblock = $matches[2];
$codeblock = htmlspecialchars($codeblock, ENT_NOQUOTES);
$codeblock = preg_replace_callback('/^\\n+/', array(
&$this,
'_doFencedCodeBlocks_newlines',
), $codeblock);
$codeblock = "<pre><code>{$codeblock}</code></pre>";
return "\n\n" . $this
->hashBlock($codeblock) . "\n\n";
}