Skip to content

Commit f7464a5

Browse files
committed
Add information about upgrading from v2 to v3 in README.md
1 parent ac52836 commit f7464a5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Full API Docs: [http://gregjacobs.github.io/Autolinker.js/api/](http://gregjacob
2727
Live Example: [http://gregjacobs.github.io/Autolinker.js/examples/live-example/](http://gregjacobs.github.io/Autolinker.js/examples/live-example/)
2828

2929

30-
## v2.0 released Dec 2018
30+
## v3.0 released Jan 2019
3131

32-
See [Upgrading from v1.x -> v2.x (Breaking Changes)](#upgrading-from-v1x---v2x-breaking-changes) at the bottom of this readme
32+
See [Upgrading from v2.x -> v3.x (Breaking Changes)](#upgrading-from-v2x---v3x-breaking-changes) at the bottom of this readme
3333

3434

3535
## Installation
@@ -451,11 +451,23 @@ if( typeof Object.assign !== 'function' ) {
451451
}
452452
```
453453
454+
## Upgrading from v2.x -> v3.x (Breaking Changes)
455+
456+
1. If you are still on v1.x, first follow the instructions in the
457+
[Upgrading from v1.x -> v2.x](#upgrading-from-v1x---v2x-breaking-changes)
458+
section below.
459+
2. The `HtmlParser` class has been removed in favor of an internal `parseHtml()`
460+
function which replaces the old regexp-based implementation with a state
461+
machine parser that is guaranteed to run in linear time. If you were using
462+
the `HtmlParser` class directly, I recommend switching to [htmlparser2](https://github.com/fb55/htmlparser2), which implements the HTML semantics
463+
better. The internal `parseHtml()` function that Autolinker now uses is
464+
fairly geared towards Autolinker's purposes, and may not be useful in a
465+
general HTML parsing sense.
454466
455467
## Upgrading from v1.x -> v2.x (Breaking Changes)
456468
457469
1. If you are still on v0.x, first follow the instructions in the
458-
[Upgrading from 0.x -> 1.x](#upgrading-from-v0x---v1x-breaking-changes)
470+
[Upgrading from v0.x -> v1.x](#upgrading-from-v0x---v1x-breaking-changes)
459471
section below.
460472
2. The codebase has been converted to TypeScript, and uses ES6 exports. You can
461473
now use the `import` statement to pull in the `Autolinker` class and related

0 commit comments

Comments
 (0)