executablebooks / MyST-Parser

An extended commonmark compliant parser, with bridges to docutils/sphinx
https://myst-parser.readthedocs.io
MIT License
760 stars 196 forks source link

No way to escape URLs so they don't linkify #631

Open asmeurer opened 2 years ago

asmeurer commented 2 years ago

Describe the bug

The linkify extension seems to think that things like stuff.py are URLs. .py doesn't seem to be a TLD listed at https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains. But either way, there doesn't seem to be a way to escape the text so that it doesn't render it as a URL. I tried stuff\.py, but this still renders as "stuff.py".

Reproduce the bug

Enable the linkify extension and create a file with "something.py".

List your environment

linkify-it-py 2.0.0 myst-parser 0.18.1

jonas-w commented 1 year ago

just FYI, '.py' is a tld. And shouldn't this be an issue at linkify-it-py and not here?

https://nic.py/ https://data.iana.org/TLD/tlds-alpha-by-domain.txt

chrisjsewell commented 1 year ago

just FYI, '.py' is a tld. And shouldn't this be an issue at linkify-it-py and not here?

I would raise this with linkify-it-py

Happy to consider adding "configurability" for linkify in myst-parser, if they offer any for this sort of thing