Skip to content

🐛 FIX: Decode punycode domains in linkified email text - #477

Open
cig13zs wants to merge 1 commit into
executablebooks:masterfrom
cig13zs:linkify-mailto-text
Open

cig13zs wants to merge 1 commit into
executablebooks:masterfrom
cig13zs:linkify-mailto-text

Conversation

@cig13zs

@cig13zs cig13zs commented Nov 17, 2026

Copy link
Copy Markdown

The core linkify rule only decodes the link text for mailto: links when the text already starts with mailto:, because the check is missing a not. So a bare email with a punycode domain keeps the raw form in the text, while markdown-it shows the decoded one:

MarkdownIt("gfm-like").render("test@xn--n3h.net")
# <a href="mailto:test@xn--n3h.net">test@xn--n3h.net</a>   (markdown-it: test@☃.net)

Added the not and a fixture in linkify.md covering both test@xn--n3h.net and mailto:test@xn--n3h.net. Full test suite, ruff check and ruff format are clean.

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant