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

Conversation

@anis-ladram
Copy link
Contributor

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
@UziTech
Copy link
Member

left a comment

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.

@anis-ladram

This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2018

Done 👌

@UziTech

UziTech approved these changes Dec 6, 2018

@styfle

styfle approved these changes Dec 6, 2018

Copy link
Member

left a comment

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

3 checks passed

WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
security/snyk - package.json (markedjsbot) No known issues
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.