Markdown applications don’t agree on how to handle underscores in the middle of a word. For compatibility, use asterisks to bold the middle of a word for emphasis.
This PR changes the patterns for bold, italic, and bolditalic to prevent matches on intra-word underscores. This is helpful to avoid matches on SNAKE_CASE words like I_LIKE_CHEESE.
It also fixes an issue where it would match on words with differing start and end patterns, e.g. _CHEESE* would result in a match.
According to this Markdown Guide:
This PR changes the patterns for
bold
,italic
, andbolditalic
to prevent matches on intra-word underscores. This is helpful to avoid matches on SNAKE_CASE words likeI_LIKE_CHEESE
.It also fixes an issue where it would match on words with differing start and end patterns, e.g.
_CHEESE*
would result in a match.