Commit ea7e576e by Carsten Brandt

fixed an issue with code highlighting

parent 64c238a2
...@@ -43,17 +43,17 @@ class ApiMarkdown extends Markdown ...@@ -43,17 +43,17 @@ class ApiMarkdown extends Markdown
// remove <code> tags added by php // remove <code> tags added by php
$text = substr(trim($text), 6, -7); $text = substr(trim($text), 6, -7);
$markup .= '<pre><code'; $code = '<pre><code';
if (isset($block['language'])) if (isset($block['language']))
{ {
if ($block['language'] !== 'php') { if ($block['language'] !== 'php') {
return false; return false;
} }
$markup .= ' class="language-'.$block['language'].'"'; $code .= ' class="language-'.$block['language'].'"';
} }
$code .= '>'.$text.'</code></pre>'."\n";
$markup .= '>'.$text.'</code></pre>'."\n"; $markup .= $code;
return true; 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