From 9790194d32d55b76a794c993665cfc53bc8434dc Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 23 Mar 2015 00:40:46 +0100 Subject: [PATCH] Fixed empty lines w/ formatting not being displayed properly --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 1c7833a7fe..5b95f046e5 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1438,9 +1438,13 @@ RedactorPlugins.wbbcode = function() { content = ''; for (var $i = 0, $length = $tmp.length; $i < $length; $i++) { - if (content.length) content += '\n'; + var $line = $tmp[$i]; + if ($line.length === 0) { + $line = this.opts.invisibleSpace; + } - content += openingTag + $tmp[$i] + closingTag; + if (content.length) content += '\n'; + content += openingTag + $line + closingTag; } return content; -- 2.20.1