It seems the actual unicode character gets ignored even with the front-end renderer, pasting directly the unicode character won't render the bold section: **b.**a (Rendering:
)
But it seems that any HTML entity will however always be seen as a delimiter, even if it's gonna be ignored when actually rendered as unicode, e.g **b.**Za (**b.**Za
) vs **b.**Za (**b.**Za
).
(Rendering:
).
So the front-end renderer might also need a little fix here where it should first interpret the HTML entities and then apply the markdown parsing rules.
As for the case of rendering that exact sequence in SO's posts, one solution to apply the bold section on seemingly only a part of a word is to use the HTML <wbr>
element instead:
b.a (**b.**<wbr>a
)
or even use the <b>
HTML element directly since it's allowed by SO's markup:
b.a (<b>b.</b>a
)
Investigating a bit more it seems that the U+200B character that OP used isn't supposed to be a delimiter anyway. So that would leave the HTML-entity -> saved as unicode round-trip as the only "bug", but even then I wonder if it's not a bug in commonmark.js itself that HTML entities are seen as delimiters... The specs say that "Conforming CommonMark parsers need not store information about whether a particular character was represented in the source using a Unicode character or an entity reference."
−_a_
.