Bear 2.0: Lists with empty lines in between are not folding and html comment appears

Testing version: Bear 2.0 (9652)

What were you doing: Testing functioning of unordered lists with empty line.

What feature did you use: Folding lists.

What happened: When there was an empty line in between items of unordered list, and I wanted to fold from last line before empty line, the text <!-- {"fold":true} --> appeared and the list did not fold.

What did you expect to happen: The list would fold in the same way as I would try to fold it from any other line.

Comment:
We have already discussed with one of Bear developer (reddit/wham00) the issue of empty lines between lists and/or indenting first line of the list further.

The context of the discussion and my usecase of empty lines in between list items: https://www.reddit.com/r/bearapp/comments/vxrtr1/comment/ihh9ph1/?utm_source=reddit&utm_medium=web2x&context=3

I understand that in strict markdown definition, towards which Bear developers now try to approach, both should not be possible. However, in Bear 2.0 I can still create empty line between list items:

To be honest, I am very grateful that I can do that (see reddit discussion above), however it still might be considered by developers as bug (as according to strict markdown specification, I believe that lines “second-three with separate line” and “second-four” should be now considered as code/or plain text, not as list item (any indented text after empty line or not following immediately after list item is considered as code/plain text in md specification)

Nevertheless, even if this feature remains (which would be perfect for me, to be honest), when I want to fold, I can do it from any line without problems, except when I do it from the last line above the empty line (in this case I place a cursor in line “second-two” and try to fold (using keyboard shortcut), the list is not folded and I get html comment which probably should stay hidden and is probably connected with Bear ability to fold in background:

Hello,

the good news is that lists in markdown allow for empty lines in between elements, so that’s perfectly fine!

The folding however is a bug, we’ll fix it in the next version :slight_smile: