From d7537d9777bea002e00db10b4630bf269ee2f8aa Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Mon, 28 Nov 2011 16:55:50 +0000 Subject: [PATCH] Improve comment and general data-* attribute normalization. --- tests/parser/parserTests.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/parser/parserTests.js b/tests/parser/parserTests.js index ce8be06033..53cf39417b 100644 --- a/tests/parser/parserTests.js +++ b/tests/parser/parserTests.js @@ -156,7 +156,8 @@ function normalizeHTML(source) { // known-ok differences. function normalizeOut ( out ) { // TODO: Do not strip newlines in pre and nowiki blocks! - return out.replace(/\n| data-sourcePos="[^>]+"|\n?/g, ''); + return out.replace(/\n| data-[a-zA-Z]+="[^">]+"/g, '') + .replace(/\n?/gm, ''); } function formatHTML ( source ) {