Plain emphasis and strong and both at once.

Underscores at word edges: emphasis and strong.

Identifiers must survive intact: snake_case_identifier, some_function(arg_one, arg_two), and a_b_c_d_e.

A name that both opens and closes at word edges does emphasise, which is what CommonMark does with foo__bar__baz too. Write __init__ in backticks.

Asterisks bind inside words: abc becomes emphasis, unfriggingbelievable.

Mixed nesting: outer inner outer and outer inner outer.

Unmatched delimiters stay put: 5 * 3 * 2, a ** b, and lone _ underscores.

Strikethrough: removed but a single ~tilde~ is literal, and so is 2~3.

Escapes win: *not emphasis*, _not emphasis_, [not a link].

Emphasis inside a link: italic link and bold link.

Code is a barrier: *not emphasis*, [[not a wikilink]], **nor this**.

Punctuation edges: "quoted", (parenthesised), and trailing.