Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 1.6.1 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc