Editing view does not correctly compile punctuations with characters in italic, bold, etc

Steps to reproduce

  1. open sandbox vault and enter the following text in note “Start Here”:
*a*bcd
*(a)*bcd
*a)*bcd
a*(b)*cd
  1. switch between editing and reading views to compare the result.

Did you follow the troubleshooting guide? Y

Expected result

Both the editing and reading views should correctly compile the syntax, rendering the characters surrounded by asterisks in italics.

Actual result

The editing view does not correctly render the characters surrounded by asterisks in italics (see snapshots below).

Environment

SYSTEM INFO:
Obsidian version: v1.6.5
Installer version: v1.5.12
Operating system: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000 23.3.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

In editing view (problematic):

In reading view (expected):

This issue also happens to other formats like boldface and links.

In some languages (e.g., Chinese), writing characters and punctuations in bold without spaces around them can be natural, so this issue can be annoying.

I have also found a similar issue here.