Skip to content

Commit 6119c59

Browse files
committed
Better format for examples, link to test cases
1 parent 5ef7129 commit 6119c59

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

README.md

+15-11
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ and unbalanced parentheses, see examples below.
6363
Supports internationalized domain names (IDN). Note that they are not validated
6464
and as a result, invalid URLs may be matched.
6565

66-
Example input and the extracted link:
66+
Example input and linked result:
6767

68-
* `http://example.com.``http://example.com`
69-
* `http://example.com,``http://example.com`
70-
* `(http://example.com)``http://example.com`
71-
* `(... (see http://example.com))``http://example.com`
68+
* `http://example.com.`[http://example.com]().
69+
* `http://example.com,`[http://example.com](),
70+
* `(http://example.com)`([http://example.com]())
71+
* `(... (see http://example.com))`(... (see [http://example.com]()))
7272
* `https://en.wikipedia.org/wiki/Link_(The_Legend_of_Zelda)`
73-
`https://en.wikipedia.org/wiki/Link_(The_Legend_of_Zelda)`
74-
* `http://üñîçøðé.com/``http://üñîçøðé.com/`
73+
[https://en.wikipedia.org/wiki/Link_(The_Legend_of_Zelda)]()
74+
* `http://üñîçøðé.com/`[http://üñîçøðé.com/]()
75+
76+
Also see [test cases](src/test/java/org/nibor/autolink/AutolinkUrlTest.java).
7577

7678
### Email address extraction
7779

@@ -81,10 +83,12 @@ but doesn't verify the domain name (may match too much).
8183

8284
Examples:
8385

84-
* `foo@example.com``foo@example.com`
85-
* `foo@example.com.``foo@example.com`
86-
* `foo@example.com,``foo@example.com`
87-
* `üñîçøðé@üñîçøðé.com``üñîçøðé@üñîçøðé.com`
86+
* `foo@example.com`[foo@example.com]()
87+
* `foo@example.com.`[foo@example.com]().
88+
* `foo@example.com,`[foo@example.com](),
89+
* `üñîçøðé@üñîçøðé.com`[üñîçøðé@üñîçøðé.com]()
90+
91+
Also see [test cases](src/test/java/org/nibor/autolink/AutolinkEmailTest.java).
8892

8993
Contributing
9094
------------

0 commit comments

Comments
 (0)