From 86e977c45f7cde76808fc6882a6c14db1bc9df1c Mon Sep 17 00:00:00 2001 From: Nick Frasser <1693461+nfrasser@users.noreply.github.com> Date: Wed, 4 Dec 2024 01:29:01 -0500 Subject: [PATCH] v4.2.0 --- CHANGELOG.md | 10 ++++++++ package-lock.json | 26 ++++++++++---------- package.json | 2 +- packages/linkify-element/package.json | 2 +- packages/linkify-html/package.json | 2 +- packages/linkify-jquery/package.json | 2 +- packages/linkify-plugin-hashtag/package.json | 2 +- packages/linkify-plugin-ip/package.json | 2 +- packages/linkify-plugin-keyword/package.json | 2 +- packages/linkify-plugin-mention/package.json | 2 +- packages/linkify-plugin-ticket/package.json | 2 +- packages/linkify-react/package.json | 2 +- packages/linkify-string/package.json | 2 +- packages/linkifyjs/package.json | 2 +- packages/linkifyjs/src/linkify.mjs | 2 +- 15 files changed, 36 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d3b4b3..03ec32e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Linkify Changelog +## v4.2.0 + +- Correctly sanitize object replacement character by treating as whitespace +- Avoid detecting invalid URLs with numbers around boundaries +- Prevent delimiter apostrophes from being included in URLs +- Correctly interpret \r\n as newline character +- Correctly interpret emoji followed by # sign +- Fix support for domain names with multiple hyphens +- Fix parsing for magnet links + ## v4.1.4 - Add support for full width middle dot `・` in hashtag plugin diff --git a/package-lock.json b/package-lock.json index 6cc76c4..05ff2f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "linkify", - "version": "4.1.4", + "version": "4.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "linkify", - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "workspaces": [ "./packages/linkifyjs", @@ -9534,14 +9534,14 @@ } }, "packages/linkify-element": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-html": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "devDependencies": { "@nfrasser/simple-html-tokenizer": "==0.5.11-2" @@ -9551,7 +9551,7 @@ } }, "packages/linkify-jquery": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "devDependencies": { "linkify-element": "*" @@ -9562,42 +9562,42 @@ } }, "packages/linkify-plugin-hashtag": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-plugin-ip": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-plugin-keyword": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-plugin-mention": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-plugin-ticket": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkify-react": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "devDependencies": { "@types/react": "^18.0.29" @@ -9608,14 +9608,14 @@ } }, "packages/linkify-string": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" } }, "packages/linkifyjs": { - "version": "4.1.4", + "version": "4.2.0", "license": "MIT" } } diff --git a/package.json b/package.json index 921d5e2..666ca34 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkify", - "version": "4.1.4", + "version": "4.2.0", "description": "Intelligent link recognition, made easy", "repository": { "type": "git", diff --git a/packages/linkify-element/package.json b/packages/linkify-element/package.json index 1051136..9c4f571 100644 --- a/packages/linkify-element/package.json +++ b/packages/linkify-element/package.json @@ -1,6 +1,6 @@ { "name": "linkify-element", - "version": "4.1.4", + "version": "4.2.0", "description": "Browser DOM element interface for linkifyjs", "main": "dist/linkify-element.cjs.js", "module": "dist/linkify-element.es.js", diff --git a/packages/linkify-html/package.json b/packages/linkify-html/package.json index 0ab7998..031640c 100644 --- a/packages/linkify-html/package.json +++ b/packages/linkify-html/package.json @@ -1,6 +1,6 @@ { "name": "linkify-html", - "version": "4.1.4", + "version": "4.2.0", "description": "HTML String interface for linkifyjs", "main": "dist/linkify-html.cjs.js", "module": "dist/linkify-html.es.js", diff --git a/packages/linkify-jquery/package.json b/packages/linkify-jquery/package.json index 068e405..79e3319 100644 --- a/packages/linkify-jquery/package.json +++ b/packages/linkify-jquery/package.json @@ -1,6 +1,6 @@ { "name": "linkify-jquery", - "version": "4.1.4", + "version": "4.2.0", "description": "jQuery interface for linkifyjs", "main": "dist/linkify-jquery.cjs.js", "module": "dist/linkify-jquery.es.js", diff --git a/packages/linkify-plugin-hashtag/package.json b/packages/linkify-plugin-hashtag/package.json index 05e9577..0b7adef 100644 --- a/packages/linkify-plugin-hashtag/package.json +++ b/packages/linkify-plugin-hashtag/package.json @@ -1,6 +1,6 @@ { "name": "linkify-plugin-hashtag", - "version": "4.1.4", + "version": "4.2.0", "description": "Hashtag plugin for linkifyjs", "main": "dist/linkify-plugin-hashtag.cjs.js", "module": "dist/linkify-plugin-hashtag.es.js", diff --git a/packages/linkify-plugin-ip/package.json b/packages/linkify-plugin-ip/package.json index 5de7c20..1ef1ed3 100644 --- a/packages/linkify-plugin-ip/package.json +++ b/packages/linkify-plugin-ip/package.json @@ -1,6 +1,6 @@ { "name": "linkify-plugin-ip", - "version": "4.1.4", + "version": "4.2.0", "description": "IP address plugin for linkifyjs", "main": "dist/linkify-plugin-ip.cjs.js", "module": "dist/linkify-plugin-ip.es.js", diff --git a/packages/linkify-plugin-keyword/package.json b/packages/linkify-plugin-keyword/package.json index 6e1a584..e361c66 100644 --- a/packages/linkify-plugin-keyword/package.json +++ b/packages/linkify-plugin-keyword/package.json @@ -1,6 +1,6 @@ { "name": "linkify-plugin-keyword", - "version": "4.1.4", + "version": "4.2.0", "description": "Keyword plugin for linkifyjs", "main": "dist/linkify-plugin-keyword.cjs.js", "module": "dist/linkify-plugin-keyword.es.js", diff --git a/packages/linkify-plugin-mention/package.json b/packages/linkify-plugin-mention/package.json index addda19..9877ee1 100644 --- a/packages/linkify-plugin-mention/package.json +++ b/packages/linkify-plugin-mention/package.json @@ -1,6 +1,6 @@ { "name": "linkify-plugin-mention", - "version": "4.1.4", + "version": "4.2.0", "description": "@mentions plugin for linkifyjs", "main": "dist/linkify-plugin-mention.cjs.js", "module": "dist/linkify-plugin-mention.es.js", diff --git a/packages/linkify-plugin-ticket/package.json b/packages/linkify-plugin-ticket/package.json index 7f11368..4aa097f 100644 --- a/packages/linkify-plugin-ticket/package.json +++ b/packages/linkify-plugin-ticket/package.json @@ -1,6 +1,6 @@ { "name": "linkify-plugin-ticket", - "version": "4.1.4", + "version": "4.2.0", "description": "Numeric ticket plugin for linkifyjs", "main": "dist/linkify-plugin-ticket.cjs.js", "module": "dist/linkify-plugin-ticket.es.js", diff --git a/packages/linkify-react/package.json b/packages/linkify-react/package.json index 4925b71..3629830 100644 --- a/packages/linkify-react/package.json +++ b/packages/linkify-react/package.json @@ -1,6 +1,6 @@ { "name": "linkify-react", - "version": "4.1.4", + "version": "4.2.0", "description": "React element interface for linkifyjs", "main": "dist/linkify-react.cjs.js", "module": "dist/linkify-react.es.js", diff --git a/packages/linkify-string/package.json b/packages/linkify-string/package.json index 43f6faf..15eddc2 100644 --- a/packages/linkify-string/package.json +++ b/packages/linkify-string/package.json @@ -1,6 +1,6 @@ { "name": "linkify-string", - "version": "4.1.4", + "version": "4.2.0", "description": "String interface for linkifyjs", "main": "dist/linkify-string.cjs.js", "module": "dist/linkify-string.es.js", diff --git a/packages/linkifyjs/package.json b/packages/linkifyjs/package.json index bb67f3c..4b1e13f 100644 --- a/packages/linkifyjs/package.json +++ b/packages/linkifyjs/package.json @@ -1,6 +1,6 @@ { "name": "linkifyjs", - "version": "4.1.4", + "version": "4.2.0", "description": "Find URLs, email addresses, #hashtags and @mentions in plain-text strings, then convert them into HTML links.", "main": "dist/linkify.cjs.js", "module": "dist/linkify.es.js", diff --git a/packages/linkifyjs/src/linkify.mjs b/packages/linkifyjs/src/linkify.mjs index 2779588..75fda9c 100644 --- a/packages/linkifyjs/src/linkify.mjs +++ b/packages/linkifyjs/src/linkify.mjs @@ -107,7 +107,7 @@ export function registerPlugin(name, plugin) { * Detect URLs with the following additional protocol. Anything with format * "protocol://..." will be considered a link. If `optionalSlashSlash` is set to * `true`, anything with format "protocol:..." will be considered a link. - * @param {string} protocol + * @param {string} scheme * @param {boolean} [optionalSlashSlash] */ export function registerCustomProtocol(scheme, optionalSlashSlash = false) {