Skip to content

Commit 0551eba

Browse files
committed
added section for www functionality
1 parent 63c74c1 commit 0551eba

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ result; // "wow <a href=\"http://test.com\">http://test.com</a> such linked"
6969
Features
7070
--------
7171

72-
### URL extraction
72+
### Qualified URL extraction
7373

7474
Extracts URLs of the form `scheme://example` with any scheme. URIs such
7575
as `example:test` are not matched (may be added as an option in the future).
@@ -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+
### Simple link extraction
97+
98+
Extract links not fully qualified URLs but still somewhat valid of the form `www.example.com`.
99+
100+
The same heuristics applies 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+
At least one TLD is required, but multiple are allowed so `www.something.co.uk` is valid.
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)