fix detection of multiline codeblocks after recent change to bbcode()

This commit is contained in:
Mario
2021-02-15 19:18:49 +00:00
parent ad0b0364b8
commit 6f71c6d950

View File

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