diff --git a/package.json b/package.json index c7a273c..f104739 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "grunt-htmlhint-inline", "description": "Grunt plugin for linting inline html", - "version": "0.1.2", + "version": "0.1.3", "homepage": "https://github.com/kazu69/grunt-htmlhint-inline", "main": "tasks/htmlhint-inline.js", "author": { diff --git a/tasks/lib/inlinehint.js b/tasks/lib/inlinehint.js index 39344b9..dd957e6 100644 --- a/tasks/lib/inlinehint.js +++ b/tasks/lib/inlinehint.js @@ -37,7 +37,7 @@ function removeTags(src, ignores) { lines[i] = ''; } else if(stops) { - lines[i] = ''; + if(tagSection) { lines[i] = ''; } tagSection = false; } @@ -66,7 +66,6 @@ function createTemporaryFiles(files, ignores, patterns) { if(ignores) source = removeTags(source, ignores); if(patterns) source = removePatterns(source, patterns); - if (/^\s*$/.test(source)) return; fs.writeFileSync(tempFile, source);