Lists do not play nice with display style equations

When writing a list, by which I mean something like

1. Some text
2. Some other text

Indentation is nicely handled automatically, and numbers for the new items also handled fine.

However, things break when there are equations in some items. I recognise in particular two issues:

Creating a newline within a $$ environment, obsidian thinks we are adding a new item in the list, and unhelpfully adds the corresponding number on the new line. For example, start typing 1. Hello $$1. Now, pressing enter, we get

1. Hello $$1

Instead, obsidian should recognise we are typing within a mathjax environment, where newlines have essentially the same effect as a space.

For what I guess are similar reasons, after an equation containing newlines, obsidian won’t recognise we are still in the same item of the list, and stop adding indentation and numbers automatically when creating new lines.

This also happens in the help vault.

	Obsidian version: v0.13.19
	Installer version: v0.13.14
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Safe mode: on