htmljs-parser
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -73,2 +73,3 @@ exports.createNotifiers = function(parser, listeners) { | ||
tagNameExpression: tagInfo.tagNameExpression, | ||
emptyTagName: tagInfo.emptyTagName, | ||
pos: tagInfo.pos, | ||
@@ -113,2 +114,3 @@ endPos: tagInfo.tagNameEndPos, | ||
tagNameExpression: tagInfo.tagNameExpression, | ||
emptyTagName: tagInfo.emptyTagName, | ||
argument: tagInfo.argument, | ||
@@ -115,0 +117,0 @@ pos: tagInfo.pos, |
@@ -48,3 +48,3 @@ var operators = exports.operators = [ | ||
exports.pattern = new RegExp('^\\s*('+operators.map(o => { | ||
var escapedOperators = operators.map(o => { | ||
if(requiresWhitespace[o]) { | ||
@@ -57,4 +57,8 @@ return '\\s'+escapeNonAlphaNumeric(o)+'\\s'; | ||
return escapeNonAlphaNumeric(o); | ||
}).join('|')+')\\s*(?!-)'); | ||
}); | ||
exports.longest = operators.sort((a, b) => b.length-a.length)[0].length+1; | ||
exports.patternNext = new RegExp('^\\s*('+escapedOperators.join('|')+')\\s*(?!-)'); | ||
exports.patternPrev = new RegExp('[^-+](?:'+escapedOperators.join('|')+')(\\s*)$'); | ||
function escapeNonAlphaNumeric(str) { | ||
@@ -61,0 +65,0 @@ return str.replace(/([^\w\d])/g, '\\$1'); |
@@ -41,3 +41,3 @@ { | ||
}, | ||
"version": "2.1.0" | ||
"version": "2.2.0" | ||
} |
@@ -223,3 +223,8 @@ 'use strict'; | ||
if (!event.shorthandId && !event.shorthandClassNames) { | ||
expect(!!tagName).to.equal(true); | ||
if (event.emptyTagName) { | ||
expect(tagName).to.equal(''); | ||
} else { | ||
expect(!!tagName).to.equal(true); | ||
} | ||
} | ||
@@ -226,0 +231,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
234805
899
3564
5864