Strip data-gen in parserTests

Change-Id: I1d3629b4d5487ff8735444069a4004fb74f926ef
This commit is contained in:
Gabriel Wicke 2012-07-16 10:37:26 -07:00
parent 235739e253
commit 2faba528aa

View file

@ -338,7 +338,7 @@ ParserTests.prototype.normalizeHTML = function (source) {
ParserTests.prototype.normalizeOut = function ( out ) {
// TODO: Do not strip newlines in pre and nowiki blocks!
return out
.replace(/<span data-mw-gc=[^>]*>((?:[^<]+|(?!<\/span).)*)<\/span>/g,
.replace(/<span data-gen=[^>]*>((?:[^<]+|(?!<\/span).)*)<\/span>/g,
'$1')
.replace(/[\r\n]| (data-mw|typeof|resource|rel|prefix|about|rev|datatype|inlist|property|vocab|content)="[^">]*"/g, '')
.replace(/<!--.*?-->\n?/gm, '')