From b5e204439f652f4d037c0099be082f715f0e5918 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 11 Jan 2019 17:45:24 +0100 Subject: [PATCH] Newline recognition for the new code highlighter See #2800 --- wcfsetup/install/files/js/WCF.Message.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 { -- 2.20.1