Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
tab-related regressions #59
I didn't quite understand 0.21 spec changes related to tabs. The general idea seems good, but devil is in the details as they say. So I checked this implementation, unfortunately, it's behavior appears to be buggy.
Tab immediately after list item marker was allowed, now it's not. Is it intentional?
$ echo -e ' -\tlist' | ./commonmark-0.20 <ul> <li>list</li> </ul> $ echo -e ' -\tlist' | ./commonmark-0.21 <p>- list</p>
If code block indentation is using half a tab, what happens?
$ echo -e ' - foo\n\n\t\tbar' | ./commonmark-0.20 <ul> <li> <p>foo</p> <pre><code> bar </code></pre> </li> </ul> $ echo -e ' - foo\n\n\t\tbar' | ./commonmark-0.21 <ul> <li> <p>foo</p> <p>ar</p> </li> </ul>
Variation of the bug above. But it might deserve a special place because it's unclear whether
$ echo -e ' - \t\tcode' | ./commonmark-0.20 <ul> <li>code</li> </ul> $ echo -e ' - \t\tcode' | ./commonmark-0.21 <ul> <li> <pre><code>de </code></pre> </li> </ul>
Actually, there's an interesting question about this case:
One might think from the spec that these would be equivalent. However, they're not; in the second case, but not the first ,we get a space at the start of the code block. Actually, that strikes me as reasonable behavior -- after all, there's no space character in the code block. But I don't think the spec ties this down tightly enough.
Note that 94053a8 fixes the missing characters problems in the original cases above, but we still have the problem that we're getting a regular paragraph rather than a code block.