Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colon after URL is included into URL, when using markdown-it with linkify: true #106

Open
andrey-skl opened this issue Sep 26, 2022 · 1 comment

Comments

@andrey-skl
Copy link

  1. Have the markdown: test https://example.org/abc: test
  2. Parse it with markdown-it, where linkify option 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:
github

Actual result: colon is included into URL
Screenshot 2022-09-26 at 10 20 06

@puzrin
Copy link
Member

puzrin commented Oct 21, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants