Repository navigation
Conversation
GFM starts a www autolink only at the start of a line, after whitespace or after *, _, ~ or (. marked started one after <, so text such as <www.example.com> became a link whose text and href swallowed the closing >, pointing at http://www.example.com%3E. GitHub renders it as plain text. Treat <www. as text unless an email address follows.
|
@breken-ai is attempting to deploy a commit to the MarkedJS Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
UziTech
requested changes
Oct 4, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Marked version: 18.0.14 (
masterat 4ee44f7)Markdown flavor: GitHub Flavored Markdown
Description
No existing issue that I could find.
Expectation
<www.example.com>is not a CommonMark autolink (it has no scheme), and GFM does not start a www autolink after<. The extended autolink section says they "can only come at the beginning of a line, after whitespace, or any of the delimiting characters*,_,~, and(". GitHub renders it as plain text:(That line is from the ESLint README.)
Result
The link text and the href both take in the closing
>, so the link points athttp://www.openjsf.org%3E, which does not load. Anyone who wraps a bare www address in angle brackets, the usual way to write a URL in a license or contact line, gets a dead link.What was attempted
The GFM
textrule stops before everywww., so the url tokenizer ran on it even when<came right before. The fix makes the text rule consume<www.as text, which matches GitHub. It leaves<www.alone when an email address follows (<www.foo@bar.com>is still an email autolink), and it does not touch real autolinks (<https://example.com>,<foo@example.com>) or www links after whitespace or(.Test:
test/specs/new/autolink_www_after_angle.md, with the expected HTML taken from GitHub's markdown API. It fails onmasterand passes with the fix.npm run test:specs(1865/1865),test:unit,test:cjs,test:umd,test:typesandtest:lintall pass. I also compared this branch withmasteron 100k generated GFM inputs, with and withoutbreaks. The only outputs that changed have awww.right after<, and the ones I spot-checked against GitHub's renderer now match it.This change was prepared with the help of an AI coding assistant, and I reviewed and tested it.
Contributor
Committer
In most cases, this should be a different person than the contributor.