Skip to content

Fix bold around autolink email address - #1385

Merged
styfle merged 2 commits into
markedjs:masterfrom
aladram:master
Dec 6, 2018
Merged

Fix bold around autolink email address#1385
styfle merged 2 commits into
markedjs:masterfrom
aladram:master

Conversation

@aladram

@aladramaladram commented Dec 6, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadtest/unit/marked-spec.js Outdated

@UziTechUziTech left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

Done 👌

@styflestyfle left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks! 🎉

@styflestyfle changed the title Autolink issue when other formattingFix bold around autolink email addressDec 6, 2018
@styfle
styfle merged commit 20d3b8c into markedjs:masterDec 6, 2018
Sign up for freeto 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.

3 participants

@aladram@UziTech@styfle