[Pkg-javascript-commits] [less.js] 16/26: Fix IE8 error test
Jonas Smedegaard
dr at jones.dk
Mon Oct 26 23:25:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag v2.1.0
in repository less.js.
commit b2aa23e88e65a4b94ffe382f621eb2c3b6a8e778
Author: Luke Page <luke.a.page at gmail.com>
Date: Sun Nov 16 16:01:32 2014 +0000
Fix IE8 error test
---
test/browser/common.js | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/test/browser/common.js b/test/browser/common.js
index bd25bad..9b56c3f 100644
--- a/test/browser/common.js
+++ b/test/browser/common.js
@@ -127,17 +127,20 @@ var testErrorSheet = function (sheet) {
return actualErrorElement !== null;
}).then(function () {
var innerText = (actualErrorElement.innerHTML
- .replace(/<h3>|<\/?p>|<a href="[^"]*">|<\/a>|<ul>|<\/?pre( class="[^"]*")?>|<\/li>|<\/?label>/g, "")
- .replace(/<\/h3>/g, " ")
- .replace(/<li>|<\/ul>|<br>/g, "\n"))
- .replace(/&/g,"&");
+ .replace(/<h3>|<\/?p>|<a href="[^"]*">|<\/a>|<ul>|<\/?pre( class="?[^">]*"?)?>|<\/li>|<\/?label>/ig, "")
+ .replace(/<\/h3>/ig, " ")
+ .replace(/<li>|<\/ul>|<br>/ig, "\n"))
+ .replace(/&/ig,"&")
+ // for IE8
+ .replace(/\r\n/g,"\n")
+ .replace(/\. \nin/,". in");
actualErrorMsg = innerText
.replace(/\n\d+/g, function (lineNo) {
return lineNo + " ";
})
.replace(/\n\s*in /g, " in ")
- .replace("\n\n", "\n")
- .replace(/\nStack Trace\n[\s\S]*/, "")
+ .replace(/\n{2,}/g, "\n")
+ .replace(/\nStack Trace\n[\s\S]*/i, "")
.replace(/\n$/, "");
errorFile
.then(function (errorTxt) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git
More information about the Pkg-javascript-commits
mailing list