Skip to content

Commit 6444b6c

Browse files
authored
Merge pull request #9 from MTDdk/master
added section for www functionality
2 parents 63c74c1 + 89cd5c9 commit 6444b6c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ Example input and linked result:
9393

9494
Also see [test cases](src/test/java/org/nibor/autolink/AutolinkUrlTest.java).
9595

96+
### WWW link extraction
97+
98+
Extract links not starting with `scheme://` but just starts with `www.` such as `www.example.com`.
99+
100+
The same heuristics apply as for the URL extraction.
101+
102+
Examples:
103+
104+
* `www.example.com.`[www.example.com]().
105+
* `(www.example.com)` → ([www.example.com]())
106+
* `[..] link:www.example.com [..]`\[..\] link:[www.example.com]() \[..\]
107+
108+
Not supported:
109+
110+
* Uppercase `www`'s, e.g. `WWW.example.com` and `wWw.example.com`
111+
* Too many or too few `w`'s, e.g. `wwww.example.com`
112+
113+
The domain must have at least 3 parts, so `www.com` is not valid, but `www.something.co.uk` is.
114+
115+
Also see [test cases](src/test/java/org/nibor/autolink/AutolinkWwwTest.java).
116+
96117
### Email address extraction
97118

98119
Extracts emails such as `foo@example.com`. Matches international email

0 commit comments

Comments
 (0)