Multi-paragraph footnote rendered as code block in editor

Steps to reproduce

Write some text with a footnote reference, and add a two-paragraph footnote. Apparently the needed indentation for the 2nd paragraph is 4 spaces which will show in edit mode as a red “code block”. In preview mode, it is shown correctly.

A restaurant is represented by the Unicode sequence U+1F374,U+FE0E[^1]

[^1]: U+FE0E is the Unicode variant selector for "text style" (so _not_ emoji style), but it is not recognized by all browsers. It is appended to the original character without any whitespace.

    U+FE0F is the variant selector for "emoji style". It would change above "🅿" to a "🅿️".

Expected result

If “pseudo-WYSIWYG” must be, then this should also been shown as part of the footnote (i.e., indented and smaller font). Preview mode apparently handles it correctly:

Actual result

Edit mode:

For me, the sudden “jump” to a pseudo-WYSIWYG “footnote representation” in the editor is distracting enough, but having the 2nd paragraph suddenly shown in monospaced red totally confuses and leads to interruption of thought/writing flow. You start maximizing Obsidian, opening another window in preview mode, all just to check if it will be rendered okay …

Environment

  • Operating system: Linux Mint 20.1/Cinnamon
  • Obsidian version: 0.12.3, installer 0.12.3

Additional information

This issue is surely related to auto-formatting the “4-space-indent code blocks”.

And yes, it’s reproducable in the Help Vault:

There isn’t a formal spec for footnotes in commonmark. It seems that both markdown-it an remark interpret

Text[^1]

[^1]: Note1 

	Notes2

as a multi-paragraph footnote.

This is an upstream issue with hypermd.

Any chance of making this an upstream issue? I guess Obsidian has more influence than a simple user …

And thanks for refining the thread title.

There many editor parsing bugs which are due to the limitations of hypermd. A rework of the editor is due in the future (both the simple editor and the new WYSWYG editor). At that point, it’s possible we ditch/rework hypermd.

Thanks for the info, so let’s see what the future brings …