Skip to content

Commit b867a45

Browse files
committed
use if statement
1 parent 878bd17 commit b867a45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

index.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/*jshint -W082 */
21
var htmlparser = require('htmlparser2');
32

43
/**
@@ -16,7 +15,9 @@ module.exports = function postHTMLParser(html) {
1615

1716
var parser = new htmlparser.Parser({
1817
onprocessinginstruction: function(name, data) {
19-
name.toLowerCase() === '!doctype' && results.push('<' + data + '>');
18+
if (name.toLowerCase() === '!doctype') {
19+
results.push('<' + data + '>');
20+
}
2021
},
2122
oncomment: function(data) {
2223
var comment = '<!--' + data + '-->',

0 commit comments

Comments
 (0)