From: Alexander Ebert Date: Sun, 22 Mar 2015 23:40:46 +0000 (+0100) Subject: Fixed empty lines w/ formatting not being displayed properly X-Git-Tag: 2.1.2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9790194d32d55b76a794c993665cfc53bc8434dc;p=GitHub%2FWoltLab%2FWCF.git Fixed empty lines w/ formatting not being displayed properly --- 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;