diff options
| -rwxr-xr-x | inc/functions.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/inc/functions.php b/inc/functions.php index cd1f8fde..ff5d51df 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -2085,6 +2085,8 @@ function markup(&$body, $track_cites = false) { $code = isset($val[2]) ? $val[2] : $val[1]; $code_lang = isset($val[2]) ? $val[1] : ""; + $code = rtrim(ltrim($code, "\r\n")); + $code = "<pre class='code lang-$code_lang'>".str_replace(array("\n","\t"), array(" ","	"), htmlspecialchars($code))."</pre>"; $body = str_replace("<code $id>", $code, $body); |
