Commit 70b0dd78 by Carsten Brandt

improvements to php codehighlight

parent 1ecc7752
......@@ -39,9 +39,12 @@ class ApiMarkdown extends Markdown
} else {
$text = highlight_string("<?php ".trim($block['text']), true);
$text = str_replace('&lt;?php', '', $text);
if (($pos = strpos($text, '&nbsp;')) !== false) {
$text = substr($text, 0, $pos) . substr($text, $pos + 6);
}
// remove <code> tags added by php
$text = substr(trim($text), 6, -7);
}
// remove <code><span style="color: #000000">\n and </span>tags added by php
$text = substr(trim($text), 36, -16);
$code = '<pre><code';
if (isset($block['language']))
......
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