mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Roman Numeral V (5) is not computing correctly #655
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 @Matt-Scheetz on GitHub (Feb 14, 2024).
Looks like Roman Numeral
Vdoes not generate if there are sub-items under the previous item,IV.Here are tests I ran. Only 1 and 3 passed.
IVbut sub-items onVIVbut no sub-items onV@Matt-Scheetz commented on GitHub (Feb 23, 2024):
@xoofx could you point me in the right direction on where to look for an update here?
@snnz commented on GitHub (Dec 18, 2024):
You just do not indent these "sub-items" enough. From the CommonMark spec:
So what you mistakenly think of as sub-items of
IV.is actually a list on the same level asIV., started byA., andV., being of the compatible type, clings to it. Try, for example, this in the last test instead:@Matt-Scheetz commented on GitHub (Dec 18, 2024):
When i use your provided input, it does not generate correctly.
input:
my output is
Rendering that to html produces the same result as my original test 5, where the roman numeral

Vis generated as the next sub-item under roman numeralIV:--- Note ---
I was able to get the list to generate a pseudo roman numeral
VafterIVwith sub-items, but the rendered html created itemVas an alpha letterVnot roman numeral 5 akaVinput:
@snnz commented on GitHub (Dec 18, 2024):
I apologize, I'd lost a whitespace before the
IV./B.when converted this from the text to the C# string. It should have been:or in plain text: