Paragraph of a certain form is swallowed by list

Steps to reproduce

Put a string like /\d+\.\S/.+ below an unordered list after at least one blank line with no indentation:

- A

0.B

Did you follow the troubleshooting guide? [Y/N]

Yes.

Expected result

The string becomes an paragraph independent of the list:

<ul>
  <li>A</li>
</ul>
<p>0.B</p>

Attributes and <div>s are omitted.

Actual result

The string becomes an paragraph within the list item:

<ul>
  <li>
    <p>A</p>
    <p>0.B</p>
  </li>
</ul>

Environment

I can reproduce this on Windows sandbox vault:

SYSTEM INFO:
	Obsidian version: v1.5.12
	Installer version: v1.4.13
	Operating system: Windows 10 Home 10.0.19045
	Login status: logged in
	Catalyst license: none
	Insider build toggle: off
	Live preview: off
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none

and Android app:

SYSTEM INFO:
	Operating system: android 13 (Sony XQ-BC42)
	Obsidian version: 1.5.12 (134)
	API version: v1.5.12
	Login status: logged in
	Catalyst license: none
	Live preview: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 4
	Plugins enabled: 4
		1: Templater v1.16.0
		2: Show Whitespace v0.3.1
		3: Calendar v1.5.10
		4: Linter v1.23.0

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

None.

1 Like

I can reproduce on MacOS Obsidian installer 1.5.3

It seems to be parsing the 0. as a list element.

Very unexpected indeed. In Reading mode, the 0.B becomes aligned with the bullet point.

An empty paragraph should separate anything below from the list, so this indeed appears to be a bug. As usual, escaping the dot as in 0\.B will workaround the bug.

I’m not sure if that is correct or not.

Here I’m switching between editing and reading view on a regular list with 3 line breaks:

ListSpacing

And here it seems like it should:

https://spec.commonmark.org/0.25/#example-221

But in this Commonmark test site, 0.B does not seem to join in the list unless there is a space in 0. B. So I still suspect this might be a bug, but I am uncertain about spacing between regular lists. https://spec.commonmark.org/dingus/

I’m not sure if that is correct or not.

Indeed, I was wrong. In Pandoc markdown, there can be an empty line, and Pandoc interprets a list without empty line as a compact list.

It shouldn’t be a list item unless there’s a space after the period, but as you can see from the HTML it’s not fully being treated as an ordered list item. Presumably list-item recognition is part of the bug (it does seem like a bug to me).

Re: loose lists, Obsidian’s default styling makes them look tight because it’s an obscure feature of Markdown that tends to confuse people. (It’s possible to re-enable loose lists with a CSS snippet.)