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

revert number of capturing parens in #1013 #1060

Merged
merged 2 commits into from
Feb 19, 2018
Merged

revert number of capturing parens in #1013 #1060

merged 2 commits into from
Feb 19, 2018

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Feb 19, 2018

This reverts the number of capturing parentheses in inline.code grammar from #1013

The regex should still function the same.

fixes #1059

@UziTech UziTech mentioned this pull request Feb 19, 2018
@Feder1co5oave
Copy link
Contributor

+1, thanks

This looks more commonmark compliant too (they don't require that leading and trailing spaces match)

lib/marked.js Outdated
@@ -468,7 +468,7 @@ var inline = {
nolink: /^!?\[((?:\[[^\]]*\]|\\[\[\]]|[^\[\]])*)\]/,
strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,
em: /^_([^\s_](?:[^_]|__)+?[^\s_])_\b|^\*((?:\*\*|[^*])+?)\*(?!\*)/,
code: /^(`+)(\s*)([\s\S]*?[^`]?)\2\1(?!`)/,
code: /^(`+)(?:\s*)([\s\S]*?[^`]?)(?:\s*)\1(?!`)/,
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no need to capture then!
/^(`+)\s*([\s\S]*?[^`]?)\s*\1(?!`)/

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch

@joshbruce
Copy link
Member

This is a merge + publish (0.3.15), yeah?

If so, makes me think we should have another owner who can publish...I’m at dinner, but if one of y’all could publish, we could increase our flow rate for hot-fix type things.

Thoughts??

@UziTech
Copy link
Member Author

UziTech commented Feb 19, 2018

yeah, merge + publish

I would be ok with more permission.

@joshbruce
Copy link
Member

@UziTech @Feder1co5oave - Any tests we can write to guard against future regression?? (Really looking forward to the CI thing.)

Publishing

@styfle
Copy link
Member

styfle commented Feb 19, 2018

Is anyone working on setting up CI? Maybe that's something I can help with.

@Feder1co5oave
Copy link
Contributor

Feder1co5oave commented Feb 19, 2018 via email

@UziTech UziTech deleted the patch-1059 branch April 5, 2018 14:38
zhenalexfan pushed a commit to zhenalexfan/MarkdownHan that referenced this pull request Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Semver 1.0 release
4 participants