Skip to content

What are the complete syntax rules for emphasis? #22854

Discussion options

You must be logged in to vote

The complete specification has 17 rules about when emphasis begins and ends. To summarize, I wrote three rules for myself:

  1. Use either asterisks or underscores to emphasize a character next to a space, punctuation, or the beginning or end of a line. Put an emphasis mark immediately next to a character, with no space between.
  • Exception. Special punctuation marks override this rule, including a backslash, backtick, and square brackets which cause an asterisk or underscore to be rendered as a character and ignored as an emphasis mark.
  1. Use an asterisk to emphasize letters and numbers next to letters and numbers. By contrast, an underscore is not an emphasis mark between letters and numbe…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants