do not wrap multi line code blocks into pre tag

This commit is contained in:
Mario
2022-09-06 09:21:39 +00:00
parent 9ac0b77e92
commit 3dfb0bcae9

View File

@@ -947,7 +947,7 @@ function bb_code_unprotect_sub($match) {
function bb_code($match) {
if(strpos($match[0], PHP_EOL))
return '<pre><code>' . bb_code_protect(trim($match[1])) . '</code></pre>';
return '<code>' . bb_code_protect(trim($match[1])) . '</code>';
else
return '<code class="inline-code">' . bb_code_protect(trim($match[1])) . '</code>';
}