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:
- Item 1
- Item 2
- Item 3
- Item 4
in edit view will equate out to either:
Item 1
Item 2
Item 3
Item 4
or
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.
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?
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 love a feature that would disable the “loose list” functionality so that lists broken up by a line break could be considered distinct lists, as I personally find that functionality super annoying. I know others do as well (see How to have a line break between list items without turning the list into a "loose" list, for example). Personally, this is one feature from more typical word processors that I miss.
I might just be lost here. Is that not what I did with the OP? When I clicked “feature request” as the topic before submitting, it gave me the prompts I responded to in the OP. Is there a different format that I should have used?
- item 1
- item 2
- item 3
+ item a
+ item b
+ item c
For me this produces:
You can choose between three different list markers, and that is -, + and *. This trick works in the reading mode since it then produces distinct list, and common CSS applies some air around distinct lists. Live preview on the other hand mashes the list item back together, since it’s in general is bad at keeping air around its lines…