r111032 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111031‎ | r111032 | r111033 >
Date:14:06, 9 February 2012
Author:gwicke
Status:deferred
Tags:nodeploy, visualeditor 
Comment:
Fix a bug in wikilink with trail tokenization.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/pegTokenizer.pegjs.txt
@@ -368,7 +368,7 @@
369369 = r:( t:[^<~[{\n\r\t|!\]} &=]+ { return t.join(''); }
370370 / directive
371371 / !inline_breaks text_char )+ {
372 - return flatten_string ( r );
 372+ return flatten ( r );
373373 }
374374
375375
@@ -875,10 +875,11 @@
876876 }
877877 } else {
878878 if (trail) {
879 - target += trail.join('');
 879+ target = target.concat( [ trail.join('') ] );
880880 }
881 - textTokens = [ target ];
 881+ textTokens = target;
882882 }
 883+ //console.log( "XXX:" + pp(obj) );
883884 return [obj].concat(textTokens, [new EndTagTk( 'a' )]);
884885 }
885886

Status & tagging log