jenkins-bot has submitted this change and it was merged.

Change subject: Fix for line break in p tag patchset 4: whitespace
......................................................................


Fix for line break in p tag
patchset 4: whitespace

Change-Id: I3a24353f06c86ec8a74629c7e6e71e6a5e2796a1
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 774e670..b101013 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -1089,11 +1089,13 @@
                        emptyLineAfter = false,
                        lastLine = false;
 
+                //Walk trough text line by line
                for (var i = 0; i < lines.length; i++) {
                        // Prevent REDIRECT from being rendered as list
                        line = lines[i].match(/^(\*|#(?!REDIRECT)|:|;)+/);
                        lastLine = (i == lines.length - 1);
 
+                        //Special Line --
                        if (line && line !== '') {
                                lines[i] = 
lines[i].replace(/^(\*|#|:|;)*\s*(.*?)$/gmi, "$2");
                                if (line[0].indexOf(':') === 0) {
@@ -1124,7 +1126,7 @@
                                        inParagraph = false;
                                }
 
-                       } else {
+                       } else { //Normal Line processing
                                emptyLine = lines[i].match(/^(\s|&nbsp;)*$/);
                                if (emptyLine) {
                                        emptyLineCount++;
@@ -1320,7 +1322,7 @@
                text = text + "\n";
 
                // process block levels
-               text = _blockLevels2html(text);
+               text = _blockLevels2html(text); //TODO: Fix missing break here, 
add <br /> for simple linebreaks
 
                // @todo check this, might be unneccessary
                text = text.replace(/<div 
style='text-align:left'>(.*?)<\/div>/gmi, "<div align='left'>$1</div>");
@@ -2245,7 +2247,7 @@
 
                do {
                        _processFlag = false;
-                       text = text.replace(/(^|\n)([^\n]+)\n([^\n]{1,5})/gi, 
__preserveSingleLinebreaks);
+                       text = 
text.replace(/(^|\n|\b)([^\n]+)\n([^\n]{1,5})/gi, __preserveSingleLinebreaks);
 
                } while (_processFlag);
 

-- 
To view, visit https://gerrit.wikimedia.org/r/225017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a24353f06c86ec8a74629c7e6e71e6a5e2796a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel <vo...@hallowelt.biz>
Gerrit-Reviewer: Ljonka <l.verhovs...@gmail.com>
Gerrit-Reviewer: Robert Vogel <vo...@hallowelt.biz>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to