# \[FR\] New Lines in Lists (Numbered & Bullet) Should Produce Distinct Lists Elements

**URL:** <https://forum.obsidian.md/t/fr-new-lines-in-lists-numbered-bullet-should-produce-distinct-lists-elements/79374>\
**Category:** Feature requests\
**Created:** [March 27, 2024, 7:14pm UTC](https://forum.obsidian.md/t/fr-new-lines-in-lists-numbered-bullet-should-produce-distinct-lists-elements/79374 "2024-03-27T19:14:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rvby1](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rvby1/32/63574_2.png) [@Rvby1](https://forum.obsidian.md/u/Rvby1)\
**Post date:** [March 27, 2024, 7:14pm UTC](https://forum.obsidian.md/t/fr-new-lines-in-lists-numbered-bullet-should-produce-distinct-lists-elements/79374/1 "2024-03-27T19:14:49Z")

</div>

Reposting this per WhiteNoise’s request. Further, per their request, I’m clarifying that this feature would be a diversion from markdown spec. This is why it should be an optional feature, similar to the already-existing markdown-breaking option to use strict line breaks.

### Use case or problem

When I write session notes for my D&D games, I typically use lists. This helps me keep my points concise and functional. However, I sometimes have multiple “sections” under one heading that don’t, to me, warrant a new header, but which are somewhat distinct. I like to separate these distinct “sections”, each formed with a bulleted list. I tend to do this with a new line (`enter`).

However, this new line doesn’t get translated over to the reading view. It’s either totally ignored by some themes (like default Obsidian), or it will cause every item in the list to be separated by a new line (like with default ITS theme).

For example:

```auto
- Item 1
- Item 2

- Item 3
- Item 4

```

in edit view will equate out to either:

```auto
- Item 1

- Item 2

- Item 3

- Item 4

```

or

```auto
- Item 1
- Item 2
- Item 3
- Item 4

```

After some discussion with SIRvb when I requested they add a feature to respect the new line to the ITS theme, they let me know that Obsidian currently doesn’t leave anything in the HTML indicating that a new line was placed within a list, so there’s no way to properly process them. The theme can either make everything be broken up by new lines or make nothing broken up by new lines.

WhiteNoise pointed out this is a feature of Markdown called loose lists. I, along with many others (as shown in the linked posts below), find this feature to be more of a annoyance than a feature and would like some way to break the function to behave more like nearly every other format aside from markdown.

### Proposed solution

This brings me to my proposed solution. Would it be possible for Obsidian, when processing the HTML, to create a unique `<ol>` or `<ul>` for a list when there is a new line breaking elements apart while an option like “disable loose lists” is on?

In other words…

```auto
- Item 1
- Item 2

- Item 3
- Item 4

```

would render out to

```auto
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
<ol>
<li>Item 3</li>
<li>Item 4</li>
</ol>

```

### Current workaround (optional)

I can sort of workaround this by…

1. Inserting some kind of text in between the lists, like this:

```auto
- Item 1
- Item 2
break it up (or %%break it up%% to be invisible about it)
- Item 3
- Item 4

```

1. Inserting a header in between the lists, like this:

```auto
- Item 1
- Item 2
# break it up
- Item 3
- Item 4

```

1. Another user also pointed out that using different sigils can also work, like this:

```auto
- Item 1
- Item 2

+ Item 1
+ Item 2

```

### Related feature requests (optional)

> <https://github.com/SlRvb/Obsidian--ITS-Theme/issues/289>
>
> \### Describe the bug
> When you create a list of items, but have a new line prese…nt anywhere in the list, the entire list is rendered as if there are new lines between every bullet point. For example...
> \`\`\`
> \- Item1
> \- Item2
> \- Item3
> \- Item4
> \`\`\`
> The above renders as expected
> \`\`\`
> \- Item1
> \- Item2
> 
> \- Item3
> \- Item4
> \`\`\`
> While the above will render with a newline between Item1, Item2, Item3, and Item4
> 
> A header seems to disrupt the rendering, so if I had two lists, only the first one would render wrong...
> \`\`\`
> \# List 1
> \- Item1
> \- Item2
> 
> \- Item3
> \- Item4
> \# List 2
> \- Item 5
> \- Item 6
> \- Item 7
> \`\`\`
> 
> While I would be much less apt to do this line-breaking with an ordered list, it technically happens there as well:
> \`\`\`
> 1. Item 1
> 2. Item 2
> 3. Item 3
> 
> 4. Item 4
> \`\`\`\`
> 
> \*\*Expected behavior\*\*
> The new line should only appear between the list items that have a new line between them in the actual markdown (Item2 and Item3 in the examples above).
> 
> \### To Reproduce
> Steps to reproduce the behavior:
> 1. Paste any of the latter two examples into a new document with ITS Theme enabled
> 
> \### Screenshots
> !\[image\](https://github.com/SlRvb/Obsidian--ITS-Theme/assets/50251449/fadd05b1-8940-4130-b126-c28aa5387f34)
> !\[image\](https://github.com/SlRvb/Obsidian--ITS-Theme/assets/50251449/a67902a9-81c0-475a-be92-903ae4c4469d)
> 
> 
> \### OS
> Where does the bug occur?
> \- \[X\] Desktop
> \- \[\] Mobile
> 
> \### Versions
> \- Obsidian Version: v1.5.3
> \- ITS Theme Version: 1.2.50
> 
> \### Additional context
> I was able to recreate this bug on a fresh vault, so I don't believe it's anything related to my style settings.

> [@How to have a line break between list items without turning the list into a "loose" list](https://forum.obsidian.md/t/how-to-have-a-line-break-between-list-items-without-turning-the-list-into-a-loose-list/29588):
>
> From what I understand, [loose lists](https://spec.commonmark.org/0.30/#loose) are a basic feature of markdown and cannot be disabled in Obsidian. I like to put line breaks between lists sometimes, and I don’t want my regular lists turning into one big loose list when I do that, so I searched for workarounds and found this to be the most elegant. You can simply insert a braille space (⠀) in the line break between your lists, and you will get two lists separated by a normal-looking line break. I found other workarounds, but they either i…

https://embed.reddit.com/r/ObsidianMD/comments/xf7wdj/is_it_by_design_that_putting_a_gap_between_any/?embed=true&ref_source=embed&ref=share

> [@How to make multiple lists with markdown?](https://forum.obsidian.md/t/how-to-make-multiple-lists-with-markdown/12566):
>
> The original post was at: which I thought is a bug of Obsidian. But the developer reminds me that it is a loose list (a feature, I guess) of markdown. So I come to the Help section looking for further help. I’m not so familiar with markdown. So my question is simple, how can I create multiple lists in Obsidian，which has a preview looks like the following:

> [@Gaps between list items are rendered inconsistently for consecutive lists](https://forum.obsidian.md/t/gaps-between-list-items-are-rendered-inconsistently-for-consecutive-lists/6181):
>
> Steps to reproduce If you have several lists but no text in between them, the two lists are rendered as one list with large gaps: - Item - Item - Item No more items. results in: [image] Including only a single letter changes this: - Item - Item A - Item No more items. Renders as expected: [image] EDIT: I forgot to mention, it may be related to this bug (because the strike through also affects more than the list): [Nested checkboxes strikethrough through entire block](https://forum.obsidian.md/t/nested-checkboxes-strikethrough-through-entire-block/5731)

> [@Bullet list: weird spacing if empty line in between](https://forum.obsidian.md/t/bullet-list-weird-spacing-if-empty-line-in-between/23511/2):
>
> Search markdown loose list

Old Thread:

> [@New Lines in Lists (Numbered & Bullet) Should Produce Distinct Lists Elements](https://forum.obsidian.md/t/new-lines-in-lists-numbered-bullet-should-produce-distinct-lists-elements/79364/3):
>
> I don’t think I implied that it was a bug here, which is why I placed this in the feature request category before it was moved to help. Or did I accidentally place it in the bug category? Obsidian uses markdown as its format, but it’s by no means tied at the hip to the spec. It has, for example, an option to make single line breaks enough to create a line break Core even though this isn’t to spec. I wasn’t aware of the concept of “loose lists” being part of the MD spec, but I would personally …

---

<div class="post-metadata">

**Author:** ![Rvby1](https://forum.obsidian.md/user_avatar/forum.obsidian.md/rvby1/32/63574_2.png) [@Rvby1](https://forum.obsidian.md/u/Rvby1)\
**Post date:** [March 27, 2024, 8:19pm UTC](https://forum.obsidian.md/t/fr-new-lines-in-lists-numbered-bullet-should-produce-distinct-lists-elements/79374/2 "2024-03-27T20:19:54Z")

</div>

Another thought: rather than breaking the MD spec, what if there was an optional feature that would look to see what list sigil was used before and after the current point, if there is one, and and determine which of the two wasn’t used and change `-`, `+`, or `*` to that sigil?

For example…

```auto
- Item 1
- Item 2

(insertion point)

+ Item 5
+ Item 6

```

If I started typing at the insertion point above, using `-` as the sigil, Obsidian would auto correct those sigils to be `*` instead since it is distinct from the list sigil before it and distinct from the list sigil after it.
