Skip to content

Commit

Permalink
Allow 4 consecutive dots in some links
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Jul 12, 2019
1 parent b5e65fe commit ea646f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/re.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ module.exports = function (opts) {
'\\"(?:(?!' + re.src_ZCc + '|["]).)+\\"|' +
"\\'(?:(?!" + re.src_ZCc + "|[']).)+\\'|" +
"\\'(?=" + re.src_pseudo_letter + '|[-]).|' + // allow `I'm_king` if no pair found
'\\.{2,3}[a-zA-Z0-9%/]|' + // github has ... in commit range links. Restrict to
'\\.{2,4}[a-zA-Z0-9%/]|' + // github has ... in commit range links,
// google has .... in links (issue #66)
// Restrict to
// - english
// - percent-encoded
// - parts of file path
Expand Down
2 changes: 2 additions & 0 deletions test/fixtures/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ http://example.com/foo_bar

https://github.com/markdown-it/linkify-it/compare/360b13a733f521a8d4903d3a5e1e46c357e9d3ce...f580766349525150a80a32987bb47c2d592efc33

https://www.google.com/search?source=hp&ei=y0QtW7yUGpiq0PEPv5qv8Ag&q=best+sci+fi+books&oq=best+sci&gs_l=psy-ab.3.1.0j0i20i264k1j0j0i131k1j0l6.2035.4079.0.5985.9.8.0.0.0.0.132.797.5j3.8.0....0...1c.1.64.psy-ab..1.8.797.0..35i39k1j0i67k1.0.iug3EHWIyxc

http://example.com/foo_bar...
http://example.com/foo_bar

Expand Down

0 comments on commit ea646f7

Please sign in to comment.