Comparing version 1.6.1 to 1.6.2
@@ -160,8 +160,7 @@ /** Text hyphenation in Javascript. | ||
charIsAngleClose = nextChar === ">", | ||
charIsHyphen = nextChar === hyphenChar, | ||
charIsSpacelike = /\s/.test(nextChar); | ||
charIsHyphen = nextChar === hyphenChar; | ||
do { | ||
if (state === STATE_READ_TAG) { | ||
if (charIsAngleClose || charIsSpacelike) { | ||
if (charIsAngleClose) { | ||
state = STATE_RETURN_UNTOUCHED; | ||
@@ -195,3 +194,8 @@ } | ||
if (charIsAngleOpen && state !== STATE_RETURN_WORD && skipHTML) { | ||
if ( | ||
charIsAngleOpen && | ||
state !== STATE_RETURN_WORD && | ||
skipHTML && | ||
!isSpacelike(text.charAt(nextCharIndex)) | ||
) { | ||
shouldHyphenate = SHOULD_SKIP; | ||
@@ -226,2 +230,4 @@ state = STATE_READ_TAG; | ||
var isSpacelike = RegExp.prototype.test.bind(/\s/); | ||
var // | ||
@@ -228,0 +234,0 @@ nextCharIndex = 0, |
{ | ||
"name": "hyphen", | ||
"version": "1.6.1", | ||
"version": "1.6.2", | ||
"description": "Text hyphenation in Javascript.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
5335519
344506