markdown-it / linkify-it

Links recognition library with full unicode support
http://markdown-it.github.io/linkify-it/
MIT License
655 stars 63 forks source link

Fully qualified domains are not fully parsed #83

Closed xPaw closed 2 years ago

xPaw commented 4 years ago

Example: https://markdown-it.github.io/linkify-it/#t1=http%3A%2F%2Fjdebp.info.%2FFGA%2Fweb-fully-qualified-domain-name.html%0Ahttp%3A%2F%2Fjdebp.info.%0Ahttp%3A%2F%2Fjdebp.info.%2F

Github handles it: http://jdebp.info./FGA/web-fully-qualified-domain-name.html http://jdebp.info./ http://jdebp.info. (no dot in url on github) http://jdebp.info.#test

Unsure if it's an easy fix without breaking anything else.

puzrin commented 4 years ago

So, prior to do anything, we need to answer question:

xPaw commented 4 years ago

http://jdebp.info. - this case can not be resolved without false positives.

I agree, and I wouldn't touch it (github doesn't either).

I would be fine with supporting dots when there's a path (so realistically look for ./?)

The link I provided would be one such real world example :)

puzrin commented 4 years ago

The link I provided would be one such real world example :)

I would disagree. The link you provided mean this is "technically possible". I think, i could invent many special cases, when linkifier fails. But technically possible != really used.

Could you explain, where (why?) people use such links as "normal case" without intent to break something?

puzrin commented 2 years ago

Closing as timed out (no feedback). But can be reopened anytime if actual & required. Feel free to add your comments.