While this code works, it will cause some confusion for those who are not aware of the best practice and/or use markdown renderers that are not negatively impacted by not following the recommendation. It will also cause confusion when someone applies document- or entry-level options and sees those options ignored because of this best practice being forced on the final document.
The function
correctInvalidMidWordBoldAndItalics()
is part of this best practice from MarkdownGuide.While this code works, it will cause some confusion for those who are not aware of the best practice and/or use markdown renderers that are not negatively impacted by not following the recommendation. It will also cause confusion when someone applies document- or entry-level options and sees those options ignored because of this best practice being forced on the final document.