Skip to content

Commit e74132e

Browse files
committed
README: Move usage before features
Probably nicer to see that first instead of the list of caveats.
1 parent 253ee9d commit e74132e

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

README.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,6 @@ limited backtracking.
1010

1111
[![Build status](https://travis-ci.org/robinst/autolink-java.svg?branch=master)](https://travis-ci.org/robinst/autolink-java)
1212

13-
Features
14-
--------
15-
16-
### URL extraction
17-
18-
Extracts URLs of the form `scheme://example` with any scheme. URIs such
19-
as `example:test` are not matched (may be added as an option in the future).
20-
If only certain schemes should be allowed, the result can be filtered.
21-
22-
Includes heuristics for not including trailing delimiters such as punctuation
23-
and unbalanced parentheses, see examples below.
24-
25-
Supports internationalized domain names (IDN). Note that they are not validated
26-
and as a result, invalid URLs may be matched.
27-
28-
Example input and the extracted link:
29-
30-
* `http://example.com.``http://example.com`
31-
* `http://example.com,``http://example.com`
32-
* `(http://example.com)``http://example.com`
33-
* `(... (see http://example.com))``http://example.com`
34-
* `https://en.wikipedia.org/wiki/Link_(The_Legend_of_Zelda)`
35-
`https://en.wikipedia.org/wiki/Link_(The_Legend_of_Zelda)`
36-
* `http://üñîçøðé.com/``http://üñîçøðé.com/`
37-
38-
### Email address extraction
39-
40-
Extracts emails such as `foo@example.com`. Doesn't support quoted local parts
41-
such as `"this is sparta"@example.com`. Matches international email addresses,
42-
but doesn't verify the domain name (may match too much).
43-
44-
Examples:
45-
46-
* `foo@example.com``foo@example.com`
47-
* `foo@example.com.``foo@example.com`
48-
* `foo@example.com,``foo@example.com`
49-
* `üñîçøðé@üñîçøðé.com``üñîçøðé@üñîçøðé.com`
50-
5113
Usage
5214
-----
5315

@@ -86,6 +48,44 @@ String result = Autolink.renderLinks(input, links, (link, text, sb) -> {
8648
result; // "wow <a href=\"http://test.com\">http://test.com</a> such linked"
8749
```
8850

51+
Features
52+
--------
53+
54+
### URL extraction
55+
56+
Extracts URLs of the form `scheme://example` with any scheme. URIs such
57+
as `example:test` are not matched (may be added as an option in the future).
58+
If only certain schemes should be allowed, the result can be filtered.
59+
60+
Includes heuristics for not including trailing delimiters such as punctuation
61+
and unbalanced parentheses, see examples below.
62+
63+
Supports internationalized domain names (IDN). Note that they are not validated
64+
and as a result, invalid URLs may be matched.
65+
66+
Example input and the extracted link:
67+
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`
72+
* `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/`
75+
76+
### Email address extraction
77+
78+
Extracts emails such as `foo@example.com`. Doesn't support quoted local parts
79+
such as `"this is sparta"@example.com`. Matches international email addresses,
80+
but doesn't verify the domain name (may match too much).
81+
82+
Examples:
83+
84+
* `foo@example.com``foo@example.com`
85+
* `foo@example.com.``foo@example.com`
86+
* `foo@example.com,``foo@example.com`
87+
* `üñîçøðé@üñîçøðé.com``üñîçøðé@üñîçøðé.com`
88+
8989
Contributing
9090
------------
9191

0 commit comments

Comments
 (0)