Closed anderskaplan closed 1 year ago
hi @pbodnar, yes still here 😄. Just holding back with more stuff until at least some of the work in progress has been merged. So thanks for the review, I'll dig into it as soon as I can.
There, I think all comments have been addressed now.
ok!
Thank you, merged. :)
For the record, this fix seems to introduce a slight performance decrease in the benchmark test (py test/benchmark.py mistletoe
), but only about 0,5%, so nothing to worry about, I think.
Also fixes failing examples 312 and 313 in the CommonMark 0.30 spec, due to the way leading space is now checked for list items.
The direct cause of the reported bug was that only spaces and not tabs were considered valid separators for list item markers. Another problem was that the implemented tab expansion, where tabs were always expanded to four spaces, did not work according to the spec, which states that tabs should be expanded to the nearest tab stop (of width 4).
This fix uses
expandtabs()
to implement the tab stops correctly and moves extraction of content into theparse_marker()
andparse_continuation()
methods. This lets us implement use cases like "list interrupts a paragraph" and "list item continuation" in a less error-prone way.