r95294 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95293‎ | r95294 | r95295 >
Date:01:18, 23 August 2011
Author:inez
Status:deferred
Tags:
Comment:
Almost completly ready getWikiDom for ListBlock
Modified paths:
  • /trunk/parsers/wikidom/lib/es/es.ListBlock.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/lib/es/es.ListBlock.js
@@ -378,7 +378,7 @@
379379 'style' : item.getStyle(),
380380 'items' : []
381381 } );
382 - lastStyle = item.getStyle();
 382+ //lastStyle = item.getStyle();
383383 }
384384 }
385385
@@ -412,6 +412,17 @@
413413 }
414414 }
415415
 416+ for( var i = stack.length; i > 1; i-- ) {
 417+ if ( stack[stack.length - 2].items.length === 0 ) {
 418+ stack[stack.length - 2].items.push( {
 419+ 'lists' : []
 420+ } );
 421+ } else if( !stack[stack.length - 2].items[stack[stack.length - 2].items.length - 1].lists ) {
 422+ stack[stack.length - 2].items[stack[stack.length - 2].items.length - 1].lists = [];
 423+ }
 424+ stack[stack.length - 2].items[stack[stack.length - 2].items.length - 1].lists.push( stack.pop() );
 425+ }
 426+
416427 stack[0].type = 'list';
417428 return stack[0];
418429 };

Status & tagging log