1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-24 10:12:19 -05:00

styling: minor fixes to span rules and examples

This commit is contained in:
Sam Whited 2017-11-10 13:35:25 -06:00
parent 5fe391b39f
commit ba088a7a3c

View File

@ -161,19 +161,24 @@
be located at the beginning of the line, or after a whitespace character. be located at the beginning of the line, or after a whitespace character.
The opening styling directive MUST also not be followed by a whitespace The opening styling directive MUST also not be followed by a whitespace
character. character.
The closing styling directive MUST NOT be preceeded by a whitespace
character.
Spans are always parsed from the beginning of the byte stream to the end Spans are always parsed from the beginning of the byte stream to the end
and are lazily matched. and are lazily matched.
Characters that would be styling directives but do not follow these rules
are not considered when matching and thus may be present between two other
styling directives.
</p> </p>
<p> <p>
For example, the word "emphasized" would be styled in each of the For example, each of the following would be emphasized as indicated:
following messages:
</p> </p>
<ul> <ul>
<li><strong>*emphasized*</strong></li> <li><strong>*emphasized*</strong></li>
<li>foo <strong>*emphasized*</strong> bar</li> <li>foo <strong>*emphasized*</strong> bar</li>
<li><strong>*emphasized*</strong>foo<strong>*emphasized*</strong></li> <li><strong>*emphasized*</strong> foo <strong>*emphasized*</strong></li>
<li><strong>*emphasized*</strong>foo*</li> <li><strong>*emphasized*</strong>foo*</li>
<li>* foo <strong>*emphasized*</strong></li> <li>* foo <strong>*emphasized*</strong></li>
<li><strong>*emphasized *foo*</strong></li>
</ul> </ul>
<p> <p>
Nothing would be styled in the following messages (where \n represents a Nothing would be styled in the following messages (where \n represents a
@ -183,6 +188,7 @@
<li>not emphasized*</li> <li>not emphasized*</li>
<li>*not emphasized</li> <li>*not emphasized</li>
<li>*not \n emphasized*</li> <li>*not \n emphasized*</li>
<li>*foo *bar</li>
<li>**</li> <li>**</li>
<li>****</li> <li>****</li>
</ul> </ul>