Skip to content

Commit

Permalink
feat(htmlhint): tag-self-close to empty-tag-not-self-closed (htmlhint…
Browse files Browse the repository at this point in the history
  • Loading branch information
linahsie committed Feb 24, 2019
1 parent e08043a commit 14abec0
Show file tree
Hide file tree
Showing 6 changed files with 3,253 additions and 3,030 deletions.
27 changes: 15 additions & 12 deletions dist/htmlhint.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
a.d(n, 'tagPair', function() {
return M;
}),
a.d(n, 'tagSelfClose', function() {
a.d(n, 'emptyTagNotSelfClosed', function() {
return E;
}),
a.d(n, 'tagnameLowercase', function() {
Expand Down Expand Up @@ -1139,8 +1139,8 @@
}
},
E = {
id: 'tag-self-close',
description: 'Empty tags must be self closed.',
id: 'empty-tag-not-self-closed',
description: 'Empty tags does not need to be self closed.',
init: function(e, t) {
var a = this,
n = e.makeMap(
Expand All @@ -1149,14 +1149,16 @@
e.addListener('tagstart', function(e) {
var r = e.tagName.toLowerCase();
void 0 !== n[r] &&
(e.close ||
t.warn(
'The empty tag : [ ' + r + ' ] must be self closed.',
e.line,
e.col,
a,
e.raw
));
e.close &&
t.warn(
'The empty tag : [ ' +
r +
' ] does not need to be self closed.',
e.line,
e.col,
a,
e.raw
);
});
}
},
Expand Down Expand Up @@ -1257,7 +1259,8 @@
'id-unique': !0,
'src-not-empty': !0,
'attr-no-duplication': !0,
'title-require': !0
'title-require': !0,
'empty-tag-not-self-closed': !0
});
}
addRule(e) {
Expand Down
Loading

0 comments on commit 14abec0

Please sign in to comment.