mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-25 10:42:45 +00:00
MD4C's permissive URL autolink read the host, never a ":port", and accepted ":" as a link boundary. "http://127.0.0.1:8059/?token=abc" linked only "http://127.0.0.1". A colon in the path ended the link the same way. Port the upstream md4c fix into the dependency patch: - 3da1937: accept single-component hosts and a numeric port after an explicit scheme - f895c2b: scan the URL tail continuously and trim terminal punctuation and excess closing parentheses - 1645761: refuse an empty hostname - f9e5eb2: stop the tail rescan from going quadratic on long lines Also refuse the autolink when a colon after the host continues the URL ("user:pass@host"). Upstream does not parse user info, and the single-component host rule would link only "http://user". The text-link pattern links these URLs whole. Rebuild the web parser with emsdk 4.0.10, which reproduces the existing glue. That version has no GROWABLE_ARRAYBUFFERS setting, and the existing artifact was built without it. The fallback text-link pattern handles URLs MD4C rejects, like user@host and IPv6 hosts. It now stops at quotes and unbalanced parentheses and leaves trailing sentence punctuation outside the link. Closes #7440 Co-authored-by: Mariotaku <git@mariotaku.me> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>