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

Pass more commonmark emphasis parsing tests #763

Merged
merged 5 commits into from
Aug 23, 2022
Merged

Conversation

nhirschey
Copy link
Collaborator

This PR improves parsing of markdown emphasis with * and _.

It adds 13 additional emphasis parsing tests from the commonmark spec. 8 of them currently fail on the main branch (first push will show that).

The new code in MarkdownParser.fs passes all old and new tests.


/// Succeeds when there's a match to a string of * or _ that could
/// open emphasis.
let inline (|LeftDelimiterRun|_|) input =
Copy link
Contributor

Choose a reason for hiding this comment

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

I'll remove the inline - these are too big to inline and there will be no useful performance gain from using it

@dsyme
Copy link
Contributor

dsyme commented Aug 23, 2022

Great tests, thanks!

@dsyme dsyme merged commit 31950ff into fsprojects:main Aug 23, 2022
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.

None yet

2 participants