Commit ea7e576e by Carsten Brandt

fixed an issue with code highlighting

parent 64c238a2
......@@ -43,17 +43,17 @@ class ApiMarkdown extends Markdown
// remove <code> tags added by php
$text = substr(trim($text), 6, -7);
$markup .= '<pre><code';
if (isset($block['language']))
{
if ($block['language'] !== 'php') {
return false;
}
$markup .= ' class="language-'.$block['language'].'"';
}
$code = '<pre><code';
if (isset($block['language']))
{
if ($block['language'] !== 'php') {
return false;
}
$code .= ' class="language-'.$block['language'].'"';
}
$code .= '>'.$text.'</code></pre>'."\n";
$markup .= '>'.$text.'</code></pre>'."\n";
$markup .= $code;
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment