let source = """
- foo
bar
"""
let document = Document(parsing: source, options: [])
print(document.debugDescription())
Tree and SourceRange:
Document
└─ UnorderedList
└─ ListItem
└─ Paragraph (1:3..<2:8 ✅)
├─ Text "foo" (1:3..<1:6 ✅)
├─ SoftBreak
└─ Text "bar" (2:3..<2:6 ❌)
Similar problems also occur with quote blocks. The source position of the leaf text node is incorrect when the indent is not aligned with the first line of the parent. This issue seems to trace back to cmark. Is there a quick workaround for this?