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 underscore adjacent to asterisk #1755

Merged
merged 2 commits into from Sep 18, 2020
Merged

fix underscore adjacent to asterisk #1755

merged 2 commits into from Sep 18, 2020

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Sep 4, 2020

Marked version: 1.1.1

Markdown flavor: CommonMark

Description

Fix underscore adjacent to asterisk

Contributor

  • Test(s) exist to ensure functionality and minimize regression

Committer

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

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

@vercel
Copy link

vercel bot commented Sep 4, 2020

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/4n6qmogpz
✅ Preview: https://markedjs-git-fork-uzitech-emstrongadjacent.markedjs.vercel.app

@@ -222,7 +222,7 @@ inline.strong.start = edit(inline.strong.start)

inline.strong.middle = edit(inline.strong.middle)
.replace(/punctuation/g, inline._punctuation)
.replace(/blockSkip/g, inline._blockSkip)
.replace(/overlapSkip/g, inline._overlapSkip)
Copy link
Member Author

Choose a reason for hiding this comment

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

this seems to be a typo from #1686

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch. Did that make any difference on the tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

no it didn't. I think in order for us to pass all of the commonmark specs for em and strong we will need a recursive way to skip internal strong and em. For example **a **b** c** should output <strong>a <strong>b</strong> c</strong> but it does not. We would need some way to realize that b** is the end of the second strong and not the first.

Copy link
Member Author

Choose a reason for hiding this comment

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

To be honest I don't know why anyone would actually do that. I'm ok with saying that is just garbage in garbage out but it is spec'd so we should probably try to find a way to fix it.

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.

Thanks!

@UziTech
Copy link
Member Author

UziTech commented Sep 17, 2020

@joshbruce @davisjam we just need one more approval to merge this

@joshbruce
Copy link
Member

@UziTech: Not in a position to finish the approved portion of checklist or tag others apparently despite trying.

@UziTech UziTech merged commit f4e4520 into markedjs:master Sep 18, 2020
@UziTech UziTech deleted the em_strong_adjacent branch September 18, 2020 00:40
@UziTech UziTech mentioned this pull request Sep 27, 2020
12 tasks
@github-actions
Copy link

🎉 This PR is included in version 1.1.2 🎉

The release is available on:

Your semantic-release 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.

Touching italic/bold doesn't render right (v1.1.1 regression)
4 participants