linkifyjs
linkifyjs copied to clipboard
v4.0
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-plugin-keywordpackage for detecting arbitrary keywords -
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: - Typescript hints and validation for options
Fixed
- Improved HTML entity parsing with
linkify-html - Improved link detection with mixed languages
- Consistent option availability across interfaces (including
truncate)
Fixes #171 Fixes #219 Fixes #245 Fixes #338 Fixes #350 Fixes #351 Fixes #357 Fixes #358 Fixes #362 Fixes #367 Fixes #372 Fixes #374 Fixes #375 Fixes #349 Fixes #365 Fixes #376 Fixes #378 Fixes #385 Fixes #387
Pull Request Test Coverage Report for Build 1329545737
- 297 of 297 (100.0%) changed or added relevant lines in 10 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+1.6%) to 94.649%
| Totals | |
|---|---|
| Change from base Build 1327335843: | 1.6% |
| Covered Lines: | 854 |
| Relevant Lines: | 878 |
💛 - Coveralls
Pull Request Test Coverage Report for Build 3079206204
- 847 of 859 (98.6%) changed or added relevant lines in 20 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage increased (+2.7%) to 95.752%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| packages/linkifyjs/src/scanner.js | 143 | 144 | 99.31% |
| packages/linkifyjs/src/linkify.js | 34 | 38 | 89.47% |
| packages/linkify-jquery/src/linkify-jquery.js | 8 | 15 | 53.33% |
| <!-- | Total: | 847 | 859 |
| Totals | |
|---|---|
| Change from base Build 2167748127: | 2.7% |
| Covered Lines: | 1070 |
| Relevant Lines: | 1090 |