Italics or Bold in footnotes introduces a space

Steps to reproduce

  1. Create a new note.
  2. Create a footnote with italics or bold followed immediately by a punctuation mark.
  3. Switch to Preview mode
  4. A space is introduced between the formatting end character (_ or *) and the character immediately following. This does not occur if there is a space after the formatting end character. This also happens before the start character, as in the example "_there_"

The following may be used as a sample:

_Italic text_.^[and _this_, dear reader, is a footnote] This is _another example_, dear reader. Testing **bolding**, boldly^[test **bolding**, **boldly** so "_there_"] "_here_"

Expected result

Expected the comma to come directly after the formatted text, as happens with regular text not in a footnote

Actual result

A space is introduced after the last character in the italicized text.

Environment

  • Operating system: MacOS 11.5.2
  • Obsidian version: v0.12.15, Safe Mode Enabled

Additional information

Sample text:

_Italic text_.^[and _this_, dear reader, is a footnote] This is _another example_, dear reader. Testing **bolding**, boldly^[test **bolding**, **boldly** so  "_there_"] "_here_"

Result screenshot: