linkify-it
linkify-it copied to clipboard
Colon after URL is included into URL, when using markdown-it with `linkify: true`
- Have the markdown:
test https://example.org/abc: test - Parse it with
markdown-it, wherelinkifyoption is enabled. See sandbox: https://markdown-it.github.io/#md3=%7B%22source%22%3A%22test%20https%3A%2F%2Fexample.org%2Fabc%3A%20test%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Afalse%2C%22_view%22%3A%22html%22%7D%7D
Expected result: Colon is not included into parsed URL, as github markdown parser does
Example from github parser:

Actual result: colon is included into URL

This is not related to markdown, see linkify-it standalone demo.
AFAIK, : is valid URL char. Restricting : at the end can break links like this: http://markdown-it.github.io/linkify-it/#t1=test%20https%3A%2F%2Fexample.org%2F%3F%3Afoo%3A%26%3Abar%3A%20test