We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
MD4C does not currently follow the rule of CommonMark spec 0.27 that
a list item can begin with at most one blank line.
Therefore we fail the Example 241.
However when we literally implement the rule as per this patch:
diff --git a/md4c/md4c.c b/md4c/md4c.c index aae2a63..a82d458 100644 --- a/md4c/md4c.c +++ b/md4c/md4c.c @@ -4833,6 +4833,18 @@ redo: ctx->last_line_has_list_loosening_effect = (n_parents > 0 && n_brothers + n_children == 0 && ctx->containers[n_parents-1].ch != _T('>')); + + /* If current list item contains nothing but a single blank line + * and we would be second blank line in the same list item, then + * we and the list. */ + if(n_parents > 0 && ctx->containers[n_parents-1].ch != _T('>') && + n_brothers + n_children == 0 && ctx->current_block == NULL && + ctx->n_block_bytes > sizeof(MD_BLOCK)) + { + MD_BLOCK* top_block = (MD_BLOCK*) ((char*)ctx->block_bytes + ctx->n_block_bytes - sizeof(MD_BLOCK)); + if(top_block->type == MD_BLOCK_LI) + n_parents--; + } } goto done; } else {
then we stop to pass the Example 274.
After inspecting, it looks as a contradiction in the spec to me. Fired the issue commonmark/commonmark-spec#443 for it.
The text was updated successfully, but these errors were encountered:
md_analyze_line: A list item can begin with at most one blank line (i…
232ceea
…ssue #6). Hacky. I very dislike it, but it brings us full CommonMark 0.27 compliance. Hallelujah.
Fixed.
Somewhat hacky, as the rule is quite unnatural given our implementation design, but works.
At least we can celebrate passing complete CommonMark 0.27 test suite. https://www.youtube.com/watch?v=Szdziw4tI9o
Sorry, something went wrong.
No branches or pull requests
MD4C does not currently follow the rule of CommonMark spec 0.27 that
Therefore we fail the Example 241.
However when we literally implement the rule as per this patch:
then we stop to pass the Example 274.
After inspecting, it looks as a contradiction in the spec to me. Fired the issue commonmark/commonmark-spec#443 for it.
The text was updated successfully, but these errors were encountered: