Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bold around autolink email address #1385

Merged
merged 2 commits into from Dec 6, 2018
Merged

Fix bold around autolink email address #1385

merged 2 commits into from Dec 6, 2018

Conversation

aladram
Copy link
Contributor

@aladram aladram commented Dec 6, 2018

Marked version: v0.5.2 (revision ed64407)

Markdown flavor: n/a

Description

  • Fixes bold + autolink bug with input __test@test.com__

This PR fixes a bug of parsing order which can lead autolink to take over parsing of other elements (e.g. bolding). Please look carefully before merging this PR: I obviously ran tests and added a new one, but this is probably a breaking change. Also, my test should probably not be there, so please feel free to edit (I allowed edit from maintainers) (this has been fixed, c.f. my force push).

Expectation

<p><strong><a href="mailto:test@test.com">test@test.com</a></strong></p>

Result

<p><a href="mailto:__test@test.co">__test@test.co</a>m__</p>

What was attempted

Reordering of parsing (autolink processing now just before text).

Contributor

  • Test added to ensure functionality and minimize regression

Committer

  • Draft GitHub release notes have been updated.
  • CI is green (no forced merge required).
  • Merge PR

test/unit/marked-spec.js Outdated Show resolved Hide resolved
Copy link
Member

@UziTech UziTech left a comment

Choose a reason for hiding this comment

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

Could you revert the minified file? The minified file will be automatically updated when a PR is merged.

After that it looks good to me.

@aladram
Copy link
Contributor Author

aladram commented Dec 6, 2018

Done 👌

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! 🎉

@styfle styfle changed the title Autolink issue when other formatting Fix bold around autolink email address Dec 6, 2018
@styfle styfle merged commit 20d3b8c into markedjs:master Dec 6, 2018
This was referenced Apr 21, 2020
zhenalexfan pushed a commit to zhenalexfan/MarkdownHan that referenced this pull request Nov 8, 2021
Fix bold around autolink email address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants