Space for Block Math equation source is not removed in lists

Steps to reproduce

a minimalist reproducible content:

$\text{Some mathjax code (no matter what)}$ must be called before the following example.

- the root node of list that I wish to collapse
	- blablabla... the equation is:
	$$ E = mc^2 $$
	- then we can solve it ...blablabla

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

yes. plugins off. snippets off. reproducible in sandbox.

Expected result

four lines of text or formula, that I can collapse in preview mode

Actual result

an empty line appears right above the formula line in preview mode

you might think that this is an unimportant minor problem, but with a long list mixed / interlaced with $$ ... $$ math blocks, the mathjax rendering will result in many empty lines interrupting your reading

BTW, those empty lines are gone in reading mode, but I’d prefer preview mode for convenience
BTW 2, if it’s not list, then plain text won’t render into extra empty lines in preview mode, as long as it’s not indented

actually, I’ve found a work around : unindent the $$ ... $$ math blocks, then there’ll be no empty line right above the formula

but then there comes the caveats:

  • when I click the root node of list, only the first sub-list item will be collapsed
  • a piece of mathjax code (no matter what) must be called before (be it $$ ... $$ block or $ ... $ inline, but the line must start with $), otherwise, not only the formula line couldn’t be recognized and collapsed, but also the text line after that couldn’t be rendered into bullets

Environment

SYSTEM INFO:
Obsidian version: v1.6.7
Installer version: v1.6.7
Operating system: Windows 10 Home 10.0.19045
Login status: not logged in
Insider build toggle: off
Live preview: on
Base theme: light
Community theme: none
Snippets enabled: 1
Restricted mode: off
Plugins installed: 19
Plugins enabled: 0


Additional information

Some more words:
As I said (in BTW 2), since the $$ ... $$ math block’s behaviour is different in list vs. in unindented plain text (see example below), I assume that the way it’s rendered in plain text is correct while it’s bugged in lists.

line 1
$$ \text{line 2} $$
line 3
Then there's no extra empty line appearing between line 1 and line 2 in preview mode.

Thank. Renamed and added video for clarity

Obsidian_UWiUY7L3Sm

The workaround with unindenting the MathJax blocks works but it feels like a clunky solution. Especially since the collapsing feature doesn’t behave properly afterward, and it messes with the list formatting. Honestly, I’d love to see this get patched in a future update.