🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

hyphen

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyphen - npm Package Compare versions

Comparing version

to
1.6.2

14

hyphen.js

@@ -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