r103470 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103469‎ | r103470 | r103471 >
Date:15:43, 17 November 2011
Author:gwicke
Status:deferred
Tags:
Comment:
Flatten inline token lists before merging text into text tokens.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt
@@ -327,6 +327,7 @@
328328 = c:(text / inline_element / (!inline_breaks ch:. { return ch; }))+ {
329329 var out = [];
330330 var text = '';
 331+ c = flatten(c);
331332 for (var i = 0; i < c.length; i++) {
332333 if (typeof c[i] == 'string') {
333334 text += c[i];
@@ -348,7 +349,7 @@
349350 = c:(text / !inline_breaks (inline_element / [^\n]))+ {
350351 var out = [];
351352 var text = '';
352 - //dp("inlineline: " + print_r(c));
 353+ c = flatten(c);
353354 for (var i = 0; i < c.length; i++) {
354355 if (typeof c[i] == 'string') {
355356 text += c[i];

Status & tagging log