I’m having fun implementing the CommonMark Spec 0.28 for Oddmuse using their spec file for automated testing. Current status:
# Looks like you failed 493 tests of 624.
Implementing simple stuff is fun. 😄
#Oddmuse
(Please contact me if you want to remove your comment.)
⁂
OK, sometimes it is not as fun it could be:
This is not emphasis, because the closing `*` is preceded by whitespace:
This is hard for the Oddmuse parser because it works like a state machine and prints immediately when looking at every token. So for Oddmuse, starting at the first `*` it sees a legal beginning of emphasis and prints `<em>` without considering whether there is a legal end to this emphasis. Oddmuse will print the closing tag when the paragraph ends. But that’s not what CommonMark wants us to do. And I can’t use a simple positive look-ahead as that will fail in this situation as the closing emphasis is actually within a code element and thus it seems to me that I need to parse and backtrack in order to solve this problem. Gaaaah.
– Alex Schroeder 2018-02-03 13:03 UTC