syntax-tree / mdast-util-gfm-autolink-literal

mdast extension to parse and serialize GFM autolink literals
https://unifiedjs.com
MIT License
8 stars 6 forks source link

Fix for email domains with no letters #5

Closed Trott closed 2 years ago

Trott commented 2 years ago

Initial checklist

Description of changes

GitHub does not link strings of the format mdast-util-gfm-autolink-literal@1.0.1 but will link if you add a letter to the label/domain. Emulate that behavior.

Ref: https://github.com/remarkjs/remark/discussions/862

github-actions[bot] commented 2 years ago

Hi! It seems some of the things asked in the template are missing? Please edit your post to fill out everything.

You won’t get any more notifications from me, but I’ll keep on updating this comment, and remove it when done!

If you need it, here’s the original template ```markdown ### Initial checklist * [ ] I read the support docs * [ ] I read the contributing guide * [ ] I agree to follow the code of conduct * [ ] I searched issues and couldn’t find anything (or linked relevant results below) * [ ] If applicable, I’ve added docs and tests ### Description of changes TODO ```

Thanks, — bb

wooorm commented 2 years ago

I can confirm that both algorithms employed by GH do not link them. I also tested some other semver versions:

react@0.11.1
react@0.12.0-rc1
react@0.14.0-alpha1
react@16.7.0-alpha.2
react@0.0.0-experimental-aae83a4b9

[ react@0.11.1
[ react@0.12.0-rc1
[ react@0.14.0-alpha1
[ react@16.7.0-alpha.2
[ react@0.0.0-experimental-aae83a4b9

react@0.11.1 react@0.12.0-rc1 react@0.14.0-alpha1 react@16.7.0-alpha.2 react@0.0.0-experimental-aae83a4b9

[ react@0.11.1 [ react@0.12.0-rc1 [ react@0.14.0-alpha1 [ react@16.7.0-alpha.2 [ react@0.0.0-experimental-aae83a4b9

wooorm commented 2 years ago

Investigating some more. I think the only rule between whether something links is whether the last character is a digit?

react@a react@1 react@1.a react@1.1 react@1.a-b react@1.a1b react@1.1-b react@1.1-alpha react@1.1-alpha1 react@1.1-a react@1.a-1

github-actions[bot] commented 2 years ago

Hi! This was closed. Team: If this was merged, please describe when this is likely to be released. Otherwise, please add one of the no/* labels.