Closed anderskaplan closed 1 year ago
Great, thank you for another contribution. :)
So it looks like, because spec examples 312 and 313 are already fixed in master now, there will be just 1 failing example left after the fixes provided in here, namely:
$ py -m test.specification
example: 146
markdown: '~~~ aa ``` ~~~\nfoo\n~~~\n'
html: '<pre><code class="language-aa">foo\n</code></pre>\n'
output: '<p><del>~ aa ``` </del>~\nfoo</p>\n<pre><code></code></pre>\n'
... the last challenge. ;)
Yes, at first I thought it was caused by the strikethrough token, but that can't be. Because the code fences should already be parsed on block level before the strikethrough can kick in on span level.
Yes, at first I thought it was caused by the strikethrough token, but that can't be. Because the code fences should already be parsed on block level before the strikethrough can kick in on span level.
Yeah, it looks like mistletoe cannot handle the following correctly (stated above the failing Example 146):
Info strings for tilde code blocks can contain backticks and tildes...
So I believe this condition is the culprit of mistletoe's failure:
if leader[0] in lang or leader[0] in line[match_obj.end():]:
return False
I.e. https://github.com/miyuchina/mistletoe/blob/v0.9.0/mistletoe/block_token.py#L430.
hey @pbodnar thanks for the review! I'll try and find some time to update the tests during next week.
all done! the last failing test case will be in a PR of its own.
Updated the commit messages and squashed the unit test updates according to review comments. Should be good to go now!
2. I would just ... and add ` (#108)` to the end of the summary line.
(note: after looking in the commits history, I have added parentheses around the number)
@anderskaplan, maybe you have overlooked this part (which groups the commits together)? Apart from that, the commits seem perfect now. :)
Thank you!
A set of small fixes which improve the CommonMark spec compliance. See the commit messages for details.