Enforce consistent emphasis / strength style
Context
markdownlint has rules for this:
They seem like good rules and mdformat can do this.
Proposal
Pick a style for emphasis and strength, and have mdformat swap the other to the chosen format.
I don't have a strong opinion about which should win, but if it's a coin-toss then I guess _Italic_ and **Strong** would be easiest for humans to differentiate?
Tasks and updates
No response
I think it'd be fine to enforce the _italic_ and **strong** rule you mention. The reason we don't do it is mostly because it can get a bit tricky with things like
- nested emphases
- literal
*and_letters within the emphasized text -
*and_are used in other CommonMark syntax rules (at least unordered lists, thematic breaks) so it can be necessary to escape the characters or prefer one character over the other (I think)
There may be some corner cases where exceptions to the rule need to be made? These should be carefully thought out.
Reusing the emphasis character from original source was a cheap way to avoid these issues.
A PR is welcome!