Markdown Style Formatting Preview Whitespace Bug

Having a space between formatting markdown elements makes the format extend beyond the intended text. This only happens in editing mode - when in reading more it works fine. It seems like an off-by-one error since placing a space at the start of the formatting removes the style preview altogether

Steps to reproduce

  • Type a word or phrase
  • place formatting around it (bold, italic, underline, etc)
  • type a space at the end or start of the entry

Expected result

Only the intended text’s format would be previewed

Actual result

More text was formatted in the preview than intended


  • Operating system: Windows 10
  • Obsidian version: 0.12.10

Additional information


This is (mostly) following standard Markdown rules.

But if you surround an * or _ with spaces, it’ll be treated as a literal asterisk or underscore.

So in your second example, the first asterisk opens <emp> but the second is a literal asterisk and so the <emp> is never closed.

The third example is the opposite.

So, Obsidian is being inconsistent with its parsing here, but neither example is valid Markdown so all bets are off.

1 Like

thanks for taking the time to give me this info! :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.