Skip to content

Commit 3bce865

Browse files
committed
Merge pull request #3 from kazu69/fixed_bug_only_match_ending_tag
Fixed bug only match ending tag
2 parents 4311517 + c989865 commit 3bce865

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grunt-htmlhint-inline",
33
"description": "Grunt plugin for linting inline html",
4-
"version": "0.1.2",
4+
"version": "0.1.3",
55
"homepage": "https://github.com/kazu69/grunt-htmlhint-inline",
66
"main": "tasks/htmlhint-inline.js",
77
"author": {

tasks/lib/inlinehint.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function removeTags(src, ignores) {
3737
lines[i] = '';
3838
}
3939
else if(stops) {
40-
lines[i] = '';
40+
if(tagSection) { lines[i] = ''; }
4141
tagSection = false;
4242
}
4343

@@ -66,7 +66,6 @@ function createTemporaryFiles(files, ignores, patterns) {
6666

6767
if(ignores) source = removeTags(source, ignores);
6868
if(patterns) source = removePatterns(source, patterns);
69-
7069
if (/^\s*$/.test(source)) return;
7170

7271
fs.writeFileSync(tempFile, source);

0 commit comments

Comments
 (0)