镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: fix autolink email after single space - #2073

Merged
UziTech merged 1 commit into
markedjs:masterfrom
UziTech:email-after-space
May 27, 2021
Merged

UziTech merged 1 commit into
markedjs:masterfrom
UziTech:email-after-space

Conversation

@UziTech

@UziTech UziTech commented May 26, 2021

Copy link
Copy Markdown
Member

Marked version: 2.0.5

Markdown flavor: GitHub Flavored Markdown

Description

fix autolink email after single space.

failing demo

fixes #2072

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel

vercel Bot commented May 26, 2021 •

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/markedjs/markedjs/G7M54BoMBzRmfZ9Z4dXqFFXqirXq
✅ Preview: https://markedjs-git-fork-uzitech-email-after-space-markedjs.vercel.app

Comment thread src/rules.js
_backpedal: /(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))/
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved the order of the look ahead before consuming more characters.

@UziTech
UziTech merged commit 6c9a899 into markedjs:master May 27, 2021
@UziTech
UziTech deleted the email-after-space branch May 27, 2021 16:15
github-actions Bot pushed a commit that referenced this pull request May 27, 2021
## [2.0.6](v2.0.5...v2.0.6) (2021-05-27)

### Bug Fixes

* fix autolink email after single space ([#2073](#2073)) ([6c9a899](6c9a899))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Logiclayer1111 pushed a commit to Logiclayer1111/marked that referenced this pull request Apr 20, 2026
## [2.0.6](markedjs/marked@v2.0.5...v2.0.6) (2021-05-27)

### Bug Fixes

* fix autolink email after single space ([#2073](markedjs/marked#2073)) ([dc702b6](markedjs/marked@dc702b6))

This branch was successfully deployed

1 active deployment
Preview — 5aa829e2 Deployed May 26, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent token type for raw emails

3 participants