r105288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105287‎ | r105288 | r105289 >
Date:11:59, 6 December 2011
Author:gwicke
Status:deferred
Tags:
Comment:
Further tweaks to headings. 157 tests now passing.
Modified paths:
  • /trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/parser/pegParser.pegjs.txt
@@ -622,7 +622,7 @@
623623 & { return setFlag('h'); }
624624 c:inlineline
625625 e:'='+
626 - spc:(space / comment)*
 626+ spc:(sp:space+ { return {type: 'TEXT', value: sp.join('') } } / comment)*
627627 &eolf
628628 {
629629 clearFlag('h');
@@ -637,7 +637,7 @@
638638 }
639639 }
640640 if(e.length > level) {
641 - var extras = e.substr(0, s.length - level),
 641+ var extras = e.substr(0, e.length - level),
642642 lastElem = c[c.length - 1];
643643 if(lastElem.type == 'TEXT') {
644644 lastElem.value = lastElem.value + extras;
@@ -647,7 +647,7 @@
648648 }
649649
650650 return [{type: 'TAG', name: 'h' + level}]
651 - .concat(c, [{type: 'ENDTAG', name: 'h' + level}]);
 651+ .concat(c, [{type: 'ENDTAG', name: 'h' + level}, spc]);
652652 }
653653 / & { dp('nomatch exit h'); clearFlag('h'); return false } { return null }
654654 ) { return r }

Status & tagging log