Skip to content

fix underscore adjacent to asterisk - #1755

Merged
UziTech merged 2 commits into
markedjs:masterfrom
UziTech:em_strong_adjacent
Sep 18, 2020
Merged

UziTech merged 2 commits into
markedjs:masterfrom
UziTech:em_strong_adjacent

Conversation

@UziTech

@UziTech UziTech commented Sep 4, 2020 •

Copy link
Copy Markdown
Member

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

vercel Bot commented Sep 4, 2020 •

Copy link
Copy Markdown

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

Comment thread src/rules.js
inline.strong.middle = edit(inline.strong.middle)
.replace(/punctuation/g, inline._punctuation)
.replace(/blockSkip/g, inline._blockSkip)
.replace(/overlapSkip/g, inline._overlapSkip)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@styfle styfle 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.

Thanks!

@UziTech

UziTech commented Sep 17, 2020

Copy link
Copy Markdown
Member Author

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

@joshbruce

Copy link
Copy Markdown
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
11 of 12 tasks
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

This branch was successfully deployed

1 active deployment
Preview — a317912f Deployed Sep 8, 2020 by vercel[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