Fixed superfluous newline after [/align]
authorAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 13:56:32 +0000 (14:56 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 19 Feb 2015 13:56:32 +0000 (14:56 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index ea6c0bef11787077d7548067064ce4e571d7d20e..b3e84c7d56d4a3b7424518b6a52b1944d2c3139c 100644 (file)
@@ -824,7 +824,7 @@ RedactorPlugins.wbbcode = function() {
                        }).bind(this));
                        
                        // [align]
-                       data = data.replace(/\[align=(left|right|center|justify)\]([\s\S]*?)\[\/align\]/gi,'<div style="text-align: $1">$2</div>');
+                       data = data.replace(/\[align=(left|right|center|justify)\]([\s\S]*?)\[\/align\]\n?/gi,'<div style="text-align: $1">$2</div>');
                        
                        // search for [*] not preceeded by [list by searching for the first occurence of [list and then check the left
                        var $firstList = data.indexOf('[list');