Ambiguity between alphabetical and Roman numeral lists
Closed this issue · 3 comments
jwnrt commented
Hi, great work with this library!
I've hit this bug in the list parsing: alphabetical lists are parsed correctly until C
and D
where they become Roman numeral lists. Those characters are ambiguous, so a little context is needed to know what kind of list item they are.
Example input:
A) first
B) second
C) third
D) fourth
E) fifth
Output:
<ol type="A">
<li>
first
</li>
<li>
second
</li>
</ol>
<ol start="100" type="I">
<li>
third
</li>
<li>
fourth
</li>
</ol>
<ol start="5" type="A">
<li>
fifth
</li>
</ol>
A) first
B) second
C) third
CI) fourth
E) fifth
hellux commented
Thanks, yes, this is a bug.
The current implementation is too naive, I will take a look at fixing
this.
hellux commented
fixed as of version 0.4.0
jwnrt commented
Thanks!