eslint-plugin-html
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "eslint-plugin-html", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "An ESLint plugin to extract and lint scripts from HTML files.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -42,3 +42,5 @@ "use strict"; | ||
scriptCode[scriptCode.length - 1] = scriptCode[scriptCode.length - 1].replace(/[ \t]*$/, ""); | ||
if (scriptCode.length) { | ||
scriptCode[scriptCode.length - 1] = scriptCode[scriptCode.length - 1].replace(/[ \t]*$/, ""); | ||
} | ||
inScript = false; | ||
@@ -45,0 +47,0 @@ index = parser.startIndex; |
@@ -150,2 +150,14 @@ "use strict"; | ||
it("extract empty script tag (#7)", function () { | ||
assertExtract( | ||
s( | ||
"<script></script>" | ||
), | ||
s( | ||
"" | ||
), | ||
[ ] | ||
); | ||
}); | ||
}); |
11380
10
251