r105287 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105286‎ | r105287 | r105288 >
Date:11:39, 6 December 2011
Author:gwicke
Status:deferred
Tags:
Comment:
Strip toc and edit sections from expected html for now.
Modified paths:
  • /trunk/extensions/VisualEditor/tests/parser/parserTests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/parser/parserTests.js
@@ -305,13 +305,14 @@
306306 .innerHTML
307307 // a few things we ignore for now..
308308 .replace(/\/wiki\/Main_Page/g, 'Main Page')
 309+ // do not expect a toc for now
 310+ .replace(/<table[^>]+?id="toc"[^>]*>.+?<\/table>/mg, '')
 311+ // do not expect section editing for now
 312+ .replace(/(<span class="editsection">\[.*?<\/span> *)?<span[^>]+class="mw-headline"[^>]*>(.*?)<\/span>/g, '$2')
 313+ // general class and titles, typically on links
309314 .replace(/(title|class|rel)="[^"]+"/g, '')
310315 // strip red link markup, we do not check if a page exists yet
311316 .replace(/\/index.php\?title=|&amp;action=edit&amp;redlink=1/g, '')
312 - // do not expect a toc for now
313 - .replace(/<table id="toc>.*?<\/table>/g, '')
314 - // do not expect section editing for now
315 - .replace(/<h[1-6]> <span>[.*?<\/span><span.*?]<\/span>/g, '')
316317 // the expected html has some extra space in tags, strip it
317318 .replace(/<a +href/g, '<a href')
318319 .replace(/" +>/g, '">');

Status & tagging log