diff --git a/CHANGE.md b/CHANGE.md index 9a82083f9..db1affe60 100644 --- a/CHANGE.md +++ b/CHANGE.md @@ -1,11 +1,12 @@ HTMLHint change log ==================== -## ver 0.9.7 (2015-3-7) +## ver 0.9.7 (2015-3-8) fix: 1. fix 'No such file' issue on mac +2. head-script-disabled: not match template script ## ver 0.9.6 (2014-6-18) diff --git a/Gruntfile.js b/Gruntfile.js index 78121c7a4..ce5e5448a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,7 +29,7 @@ module.exports = function(grunt) { concat: { htmlhint: { src: ['src/core.js', 'src/reporter.js', 'src/htmlparser.js', 'src/rules/*.js'], - dest: 'lib/htmlhint.src.js' + dest: 'lib/htmlhint.js' } }, "mocha-hack": { diff --git a/coverage.html b/coverage.html index 300e87460..983174936 100644 --- a/coverage.html +++ b/coverage.html @@ -1,4 +1,4 @@ -Coverage'; + messages = HTMLHint.verify(code, ruleOptions); + expect(messages.length).to.be(1); + code = ''; + messages = HTMLHint.verify(code, ruleOptions); + expect(messages.length).to.be(1); }); it('Script in body not result in an error', function(){ @@ -39,4 +45,13 @@ describe('Rules: '+ruldId, function(){ expect(messages.length).to.be(0); }); + it('Template script in head not result in an error', function(){ + var code = ''; + var messages = HTMLHint.verify(code, ruleOptions); + expect(messages.length).to.be(0); + code = ''; + messages = HTMLHint.verify(code, ruleOptions); + expect(messages.length).to.be(0); + }); + }); \ No newline at end of file diff --git a/test/rules/href-abs-or-rel.js b/test/rules/href-abs-or-rel.js index 87b02871b..af0bde87f 100644 --- a/test/rules/href-abs-or-rel.js +++ b/test/rules/href-abs-or-rel.js @@ -5,7 +5,7 @@ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'href-abs-or-rel'; var ruleOptions = {}; diff --git a/test/rules/id-class-ad-disabled.js b/test/rules/id-class-ad-disabled.js index ffae69fb9..f8e2b5b24 100644 --- a/test/rules/id-class-ad-disabled.js +++ b/test/rules/id-class-ad-disabled.js @@ -5,7 +5,7 @@ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'id-class-ad-disabled', ruleOptions = {}; diff --git a/test/rules/id-class-value.spec.js b/test/rules/id-class-value.spec.js index 9b097df42..ddc54730e 100644 --- a/test/rules/id-class-value.spec.js +++ b/test/rules/id-class-value.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'id-class-value', ruleOptionsUnderline = {}, ruleOptionsDash = {}, ruleOptionsHump = {}, ruleOptionsReg = {}; diff --git a/test/rules/id-unique.spec.js b/test/rules/id-unique.spec.js index b50982b3a..5c9f33781 100644 --- a/test/rules/id-unique.spec.js +++ b/test/rules/id-unique.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'id-unique', ruleOptions = {}; diff --git a/test/rules/jshint.js b/test/rules/jshint.js index bf81238e5..91ac35a7a 100644 --- a/test/rules/jshint.js +++ b/test/rules/jshint.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'jshint', ruleOptions = {}; diff --git a/test/rules/space-tab-mixed-disabled.js b/test/rules/space-tab-mixed-disabled.js index ed10c8eba..49a08e236 100644 --- a/test/rules/space-tab-mixed-disabled.js +++ b/test/rules/space-tab-mixed-disabled.js @@ -5,7 +5,7 @@ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'space-tab-mixed-disabled', ruleOptions = {}; diff --git a/test/rules/spec-char-escape.spec.js b/test/rules/spec-char-escape.spec.js index 88d6e00d1..89e4b24d2 100644 --- a/test/rules/spec-char-escape.spec.js +++ b/test/rules/spec-char-escape.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'spec-char-escape', ruleOptions = {}; diff --git a/test/rules/src-not-empty.js b/test/rules/src-not-empty.js index 7af61d4cf..3c43b5213 100644 --- a/test/rules/src-not-empty.js +++ b/test/rules/src-not-empty.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'src-not-empty', ruleOptions = {}; diff --git a/test/rules/style-disabled.spec.js b/test/rules/style-disabled.spec.js index de6374d89..ba4a9c04f 100644 --- a/test/rules/style-disabled.spec.js +++ b/test/rules/style-disabled.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'style-disabled', ruleOptions = {}; diff --git a/test/rules/tag-pair.spec.js b/test/rules/tag-pair.spec.js index 9faab0420..b781c4377 100644 --- a/test/rules/tag-pair.spec.js +++ b/test/rules/tag-pair.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'tag-pair', ruleOptions = {}; diff --git a/test/rules/tag-self-close.spec.js b/test/rules/tag-self-close.spec.js index 9467d866d..0d62caed0 100644 --- a/test/rules/tag-self-close.spec.js +++ b/test/rules/tag-self-close.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'tag-self-close', ruleOptions = {}; diff --git a/test/rules/tagname-lowercase.spec.js b/test/rules/tagname-lowercase.spec.js index 5e28676df..cda6611d1 100644 --- a/test/rules/tagname-lowercase.spec.js +++ b/test/rules/tagname-lowercase.spec.js @@ -1,11 +1,11 @@ /** - * Copyright (c) 2013, Yanis Wang + * Copyright (c) 2015, Yanis Wang * MIT Licensed */ var expect = require("expect.js"); -var HTMLHint = require("../../lib/htmlhint.src.js").HTMLHint; +var HTMLHint = require("../../index").HTMLHint; var ruldId = 'tagname-lowercase', ruleOptions = {};