mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Nested lists of roman numerals that differ in casing fail to parse properly #747
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @manutiedra on GitHub (Jul 19, 2025).
If I try to parse this:
I get the proper AST:
However, if I change the list before the roman numerals in lowercase to a list with roman numbers in uppercase like this:
the AST generated is wrong, as it didn't create a third level for the list with lowercase roman numerals:
@grc4kd commented on GitHub (Oct 4, 2025):
Hi, I was able to reproduce and dig into the issue a little bit, and I may have a solution.
Adding spaces for indentation before the third-level nested list element appears to resolve the issue. Specifically, I tried adding one extra space to the nested list items opening:
to:
Resulting in the following markdown input:
From what I can gather, the normal indentation rules about nested lists are causing the issue, where there was not enough indentation away from the list item delimiter
)in the lineII) Core Doctrines.Does this help explain the unexpected behavior?
@xoofx commented on GitHub (Oct 5, 2025):
Good catch. I missed this detail when reading the issue in the first place. Actually, this is not unexpected but part of the indentation rules for list items in the spec.