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 2 commits into from Dec 6, 2018


Copy link

commented Dec 6, 2018

Marked version: v0.5.2 (revision ed64407)

Markdown flavor: n/a


  • 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).


<p><strong><a href=""></a></strong></p>


<p><a href=""></a>m__</p>

What was attempted

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


  • Test added to ensure functionality and minimize regression


  • 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

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.


This comment has been minimized.

Copy link
Contributor Author

commented Dec 6, 2018

Done 👌


UziTech approved these changes Dec 6, 2018


styfle approved these changes Dec 6, 2018

Copy link

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