From: Alexander Ebert Date: Fri, 11 Jan 2019 16:45:24 +0000 (+0100) Subject: Newline recognition for the new code highlighter X-Git-Tag: 5.2.0_Alpha_1~365^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5e204439f652f4d037c0099be082f715f0e5918;p=GitHub%2FWoltLab%2FWCF.git Newline recognition for the new code highlighter See #2800 --- diff --git a/wcfsetup/install/files/js/WCF.Message.js b/wcfsetup/install/files/js/WCF.Message.js index bd9d8a3837..cdb140c01d 100644 --- a/wcfsetup/install/files/js/WCF.Message.js +++ b/wcfsetup/install/files/js/WCF.Message.js @@ -1221,7 +1221,7 @@ if (COMPILER_TARGET_DEFAULT) { $text += "\n"; } break; - + case 'P': $text += "\n\n"; break; @@ -1230,6 +1230,13 @@ if (COMPILER_TARGET_DEFAULT) { case 'IMG': $text += " " + $node.alt + " "; break; + + // Code listing + case 'DIV': + if ($node.classList.contains('codeBoxHeadline') || $node.classList.contains('codeBoxLine')) { + $text += "\n"; + } + break; } } else {