You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-13Lines changed: 10 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -25,22 +25,19 @@ or was just limited in one way or another.
25
25
26
26
So, this utility attempts to handle everything. It:
27
27
28
-
- Autolinks URLs, whether or not they start with the protocol (i.e. 'http://').
28
+
- Autolinks **URLs**, whether or not they start with the protocol (i.e. 'http://').
29
29
In other words, it will automatically link the text "google.com", as well as
30
-
"http://google.com". Will also autolink IPv4 addresses.
31
-
- Will properly handle URLs with query params, anchors,
32
-
and special characters, and not include chars like a trailing `.` at the end
33
-
of a sentence, or a `)` char if the URL is inside parenenthesis.
34
-
- Will autolink email addresses
35
-
- Will autolink phone numbers
36
-
- Will autolink mentions (Twitter, Instagram, Soundcloud, TikTok, Youtube)
37
-
- Will autolink hashtags (Twitter, Instagram, Facebook, TikTok, Youtube)
38
-
- Won't clobber URLs with hash anchors by treating them as hashtags (like some other libraries do). For example: `google.com/#anchor` is properly linked.
30
+
"http://google.com". Will also autolink **IPv4 addresses**.
31
+
- Will autolink **email addresses**
32
+
- Will autolink **phone numbers**
33
+
- Will autolink **@mentions** (Twitter, Instagram, Soundcloud, TikTok, Youtube)
34
+
- Will autolink **#hashtags** (Twitter, Instagram, Facebook, TikTok, Youtube)
35
+
- Won't clobber URLs with #hash anchors by treating them as hashtags like some other libraries do. For example: `google.com/#anchor` is properly linked.
39
36
-**Will properly handle HTML input.** The utility will not overwrite an `href`
40
-
attribute inside anchor (`<a>`) tags (or any other tag/attribute), and will not
37
+
attribute inside anchor (`<a>`) tags or any other tag/attribute, and will not
41
38
accidentally wrap the inner text of `<a>`/`<script>`/`<style>` tags with a new
42
-
one (which cause doubly-nested anchor tags, or mess with scripts)
43
-
- Will do all of this in `O(n)` (linear) time with low constant factors and without the possibility of RegExp [Catastrophic Backtracking](https://www.regular-expressions.info/catastrophic.html), making it extremely fast and unsusceptible to pathological inputs.
39
+
one (which would cause doubly-nested anchor tags, or mess with scripts)
40
+
- Will do all of this in `O(n)` (linear) time with low constant factors and without the possibility of RegExp [Catastrophic Backtracking](https://www.regular-expressions.info/catastrophic.html), making it extremely fast and unsusceptible to [DoS](https://en.wikipedia.org/wiki/Denial-of-service_attack) inputs.
0 commit comments