Add more options
eight04 opened this issue · comments
Currently (~7.3.1), Linkify Plus Plus is so greedy that you can only stop it by adding specified elements to ignore filter. Should we let users adjust more detail behavior?
Current:
- Protocol is not checked. Any word can be a protocol if it suffixes with
://
. - Domain must have a valid TLD.
- The slash can be skipped if there are only domain followed by query string. (http://stackoverflow.com/questions/1617058/ok-to-skip-slash-before-query-string)
- Four numbers IP address will always be linkified.
- Consider underscore as a separate character.
Strict mode? (not implement yet)
- The link must be surrounded by spaces.
- If it is not surrounded by spaces, it must be surround by separate characters (e.g. brackets) that surround by spaces.
- Force lower-case domain.
- Limit the length between each period in the domain.
References:
https://greasyfork.org/en/forum/discussion/comment/28440
http://markdown-it.github.io/linkify-it/
surrounded by spaces and fuzzyip options are added in 7.4.0.
The option works great but I still wonder why the underscores are considered as separators by default? Do people often type things like _www.site/foo_
?
I don't remember. Probably some sites use it as a separator? (e.g. markdown?)
An interesting thing is that trailing underscores are not removed so _www.site/foo_
becomes _[www.site/foo_]
.