Canop / termimad

A library to display rich (Markdown) snippets and texts in a rust terminal application
MIT License
914 stars 31 forks source link

Incorrect handling of list entry text #56

Open sidju opened 12 months ago

sidju commented 12 months ago

To add multiple lines of text to a list entry one should indent the text below the entry to signify that it belongs to it. This sign isn't currently looked for by termimad, so the text of a sub-list entry is highlighted as a codeblock (since it is indented 4 spaces).

Adding some statefulness to the printing, to track if printing indented lines after a list entry of which depth, would be a nice improvement.

zannabianca1997 commented 5 months ago

I am having this issue too. It's more a problem of minimad, I am going to open a PR there. I fear it will be difficult to add state to the parser, as the whole parsing is only line-based