Emphasis begins with a delimiter that can open emphasis and ends with a delimiter that can close emphasis, and that uses the same character (_ or *) as the opening delimiter. The opening and closing delimiters must belong to separate delimiter runs. If one of the delimiters can both open and close emphasis, then the sum of the lengths of the delimiter runs containing the opening and closing delimiters must not be a multiple of 3.
But I have no idea what it means by “the sum of the lengths of the delimiter runs containing the opening and closing delimiters.”
What is it, and why it must not be a multiple of 3?
What happens if it is a multiple of 3?
Edit: I found the demonstration on the same website and there was a code
> ([source](http://spec.commonmark.org/dingus/commonmark.js)). My rough understanding is that this rule was intended for restricting three-character delimiter runs in the middle of alphanumeric characters. (e.g. "\*\*\*hello\*\*\*" will be rendered to be ***hello***, but "\*\*\*hello\*\*\*world" will not be rendered.) However, I'm not sure if my understanding is correct, and why such restriction is needed if I understood it correctly.
Thank you for your answer. Then the purpose of the rule is to handle the ‘em-inside-strong’ (and also the ‘strong-inside-em’) cases, right? Isn’t there any simpler and more intuitive way to make those cases work properly? I mean, I think this rule is unintentionally restricting some other cases: for example, ***hello***world syntax that I have mentioned.
Thank you for your answer. Then the purpose of the rule is to handle
with the ‘em-inside-strong’ (and also the ‘strong-inside-em’) cases,
right? Isn’t there any simpler and more intuitive way to make those
cases work properly? I mean, I think this rule is unintentionally
restricting some other cases: for example, helloworld syntax that
I have mentioned.
Well, I’m certainly openminded about this, if you have a better approach to suggest. We have a fairly large corpus of cases in the test suite. If you can come up with a different algorithm, it can easily be tested against those to see if it has unintended bad results.