Reverted some changes
authorAlexander Ebert <ebert@woltlab.com>
Sun, 26 Apr 2015 15:04:26 +0000 (17:04 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 26 Apr 2015 15:04:26 +0000 (17:04 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js

index 2d4263cc48d7ec9debd974c9db9b5c810affa877..f87fd2eea226730fc87453c7bcb7c3e2d10248d3 100644 (file)
@@ -958,20 +958,10 @@ RedactorPlugins.wbbcode = function() {
                        }
                        
                        // [*]
-                       var $hasListItems = false;
                        data = data.replace(/\[\*\]([\s\S]*?)(?=\[\*\]|\[\/list\])/gi, function(match, content) {
-                               $hasListItems = true;
-                               
                                return '<li>' + $.trim(content) + '</li>';
                        });
                        
-                       // fix expanded formatting for lists
-                       if ($hasListItems) {
-                               data = data.replace(/(<p style="[^"]+">)(\[list[^\]]*\])?<li>/g, '$2<li>$1');
-                               data = data.replace(/(<p style="[^"]+">)<\/li><li>/g, '</li><li>$1');
-                               data = data.replace(/(<\/li>\[\/list\])<\/p>/g, '$1');
-                       }
-                       
                        // fix superflous newlines with nested lists
                        data = data.replace(/\n*(\[list\]<\/li>)/g, '$1');
                        
@@ -1421,7 +1411,6 @@ RedactorPlugins.wbbcode = function() {
                                                + '</div>';
                                        }).bind(this));
                                        
-                                       //data = data.replace(new RegExp('(?:<p>)?(@@' + $cachedCode.key + '@@)(?:<\/p>)?', 'g'), '$1');
                                        data = data.replace($regex, $value);
                                }
                        }