tpope / vim-markdown

Vim Markdown runtime files
1.23k stars 191 forks source link

Second line in nested list item becomes a code block #145

Closed marlun closed 5 years ago

marlun commented 5 years ago

I've read the other issues with newlines but not understood if I could fix this myself. If I nest a list item and it gets longer than 1 line it's highlighted as a code block:

* Listitem
  - Nested list item with a long text
    this becomes highlighted as code block
  - Just another item
* Just another item

Could this be fixed or is it just a result of a compromise needed to be done with regex highlighting of markdown?

tpope commented 5 years ago

It's a compromise. I imagine a more elaborate compromise that supports this use case would be possible, by defining a "2 space list item" that can only be followed by a "6 space code block", or whatever the appropriate logic is, but it's not a rabbit hole I personally have time to go down.

marlun commented 5 years ago

OK, I'll close the issue since it's not a big deal and I got my answer, thanks!