Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Bug: Lists separate when there are two similar sequential lists

A topic by Alzarath created Mar 29, 2021 Views: 133 Replies: 3
Viewing posts 1 to 2
(4 edits)

Deepdwn v 0.20.0
Screenshots
Linux 5.11.5-arch1-1 (Arch Linux x86_64)

Reproduction

Create a list with 3 or more values. Insert an empty line between two entries in the list

Description

When creating two similar lists in order, all entries appear to be separated into individual lists in the preview window. This only applies to lists of the same type (e.g. ordered, unordered).

Expected

When creating two lists separated by an empty line, two lists should form.

Notes

This also applied to the previous version.

(2 edits)

Thank for the feedback! You may be surprised to learn this isn’t a bug, but comes from the CommonMark markdown spec for “loose” lists (lists with internal newlines):

https://spec.commonmark.org/0.29/#loose https://github.com/commonmark/commonmark-spec/issues/628

Deepdwn isn’t 100% CommonMark compliant (especially in the editor), but much of the markdown preview is.

Hope that helps!

[edit] Common ways to handle this if you want to separate two lists of the same type without treating it as one ‘loose’ list would be:

Use different markers for the two lists:

* list 1 item 1
* list 1 item 2

+ list 2 item 1
+ list 2 item 2

- list 3 item 1
- list 3 item 2

1. Ordered list 1 item 1
2. Ordered list 1 item 2

3) Ordered list 2 item 1
4) Ordered list 2 item 2

or

Add a separator

* list 1 item 1
* list 1 item 2

<!-- -->

* list 2 item 1
* list 2 item 2
(1 edit)

I see. Apologies for the misunderstanding. I couldn’t quite find any information on why one would want to use a loose list, but I trust there is a reason for it.

A way around it is just using different types of lists, such as

* First
* Second

- Third
- Fourth

Stylistically not a fan, but if it’s what needs to be done.

No worries! It’s something I only learned about working on this project.