Releases: nfrasser/linkifyjs
Releases · nfrasser/linkifyjs
v4.0.1
v4.0.0
Breaking Changes
- Removed deprecated
linkifyjs/string,linkifyjs/html,linkifyjs/plugins/*
packages. Uselinkify-string,linkify-htmlandlinkify-plugin-*instead. - Refactored scanner internals break custom link plugins created with Linkify v3
- Links that begin with
mailto:now have typeurlinstead ofemail - Drop official IE 11 support
Added
linkify-plugin-ipplugin for detecting IPv4 and IPv6 addresseslinkify-plugin-keywordplugin for detecting arbitrary keywordslinkify.find()function accepts anoptionsargument for output formatting- New
renderoption to override link rendering - Second
optionalSlashSlashargument forregisterCustomProtocolto allow links that don't require//afterscheme: - Link token methods
toFormattedString(options),toFormattedHref(options)andtoFormattedObject(options)that accept alinkify.Optionsobject - More granular scanner tokens for improved plugin flexibility
linkify-react: Newasproperty (alias fortagName)
Fixed
- Improved link detection with mixed languages
- Consistent option availability across interfaces (including
truncate) linkify-html: Improved HTML entity parsing
v4.0.0-beta.1
Breaking Changes
- Removed deprecated
linkifyjs/string,linkifyjs/html,linkifyjs/plugins/*packages - Refactored scanner internals break plugins created with Linkify v3
- Links that begin with
mailto:now have typeurlinstead ofemail
Added
linkify.find()function accepts a thirdoptionsargument for output formatting- Link token methods
toFormattedString(options),toFormattedHref(options)andtoFormattedObject(options)that accept alinkify.Optionsobject - New
renderoption to override link rendering - More granular scanner tokens for improved plugin flexibility
- Second
optionalSlashSlashargument forregisterCustomProtocolto allow links that don't require//afterscheme:
Fixed
- Improved HTML entity parsing with
linkify-html - Improved link detection with mixed languages
- Consistent option availability across interfaces (including
truncate)
v3.0.5
v3.0.4
v3.0.3
v3.0.2
v3.0.1
v3.0.0
BREAKING CHANGES
- React, jQuery and Element interfaces moved to dedicated packages at
linkify-react,linkify-jqueryandlinkify-elementrespectively: - Remove default
class="linkified"from all discovered links. Opt back in by setting theclassNameoption:linkifyStr(str, { className: 'linkified' })
- Remove default
target="_blank"attribute for discovered URLs. Opt back in by setting thetargetoption:linkifyHtml(str, { target: (href, type) => type === 'url' && '_blank' })
- React component: Remove outer
<span>tag wrapper in favour of tag-lessReact.Fragmentfor React >=16. To opt back-in, settagName='span':<Linkify tagName='span'>{content}</Linkify>
- AMD module interface is no longer provided. Use an ESM bundler instead.
- Plugins imported after linkify is called on a string for the first time will not longer work. Import all plugins before calling a linkify core or interface function.
- Custom plugin API is not compatible with previous API in Linkify v2
- Dropped support for Internet Explorer versions 9 and 10. IE11 is still supported
- Dropped support for React versions <15
Deprecations
- Use dedicated packages
linkify-stringandlinkify-htmlinstead oflinkifyjs/stringandlinkifyjs/html. The embedded packages will be removed in v4.0 - Use dedicated plugin packages
linkify-plugin-[PLUGIN]instead oflinkifyjs/plugin/[PLUGIN]. The embedded packages will be removed in v4.0
All Changes
- Full Internationalized Domain (IDN) and Emoji domain support 🇺🇳🌍
✈️ 🎉💃! Detect URLs, #hashtags and @mentions in any language - ~10x faster startup; ~4x faster combined startup + first run
- Custom protocols with
linkify.registerCustomProtocol('protocol') - Modernized codebase and build system
- Add new
reloption at top level as an alternate way of including it inattributes - New and improved plugin API
- TypeScript definitions included in published packages
linkify.find()output includes start and end indexes for where in the string a link was found- Plugins no longer need to be called on linkify after import
// Before import * as linkify from 'linkifyjs' import hashtag from 'linkifyjs/plugins/hashtag' hashtag(linkify) // After import * as linkify from 'linkifyjs' import 'linkifyjs/plugins/hashtag'