docling
docling copied to clipboard
HTML backend doesn't see start option of <ol> tag
HTML backend doesn't see start option of <ol> tag.
Example:
Input HTML
<html><body>
<ol start="2"><li> Some Text </li></ol>
</body></html>
Output in MD: "1. Some text"
@Matteo-Omenetti According to the markdown basic syntax, ordered lists should always start with 1. A solution would be to use the HTML syntax for these cases, but not all Markdown applications support HTML.
Nevertheless, it seems that interpreters like GitHub accept other starting numbers (provided that they have less than 10 digits) according to the GitHub Flavored Markdown Spec even with the basic syntax. So this is the solution I would propose to address these cases.
Check the examples below and how they are rendered in Github:
Ordered list starting with 2 with basic syntax
- Item 2
- Item 3
- Item 4
Ordered list starting with 2 with basic syntax with the same item number
- Item 2
- Item 3
- Item 4