1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-12-21 23:28:51 -05:00

styling: more cleanup and feedback addressed

This commit is contained in:
Sam Whited 2017-11-10 18:54:54 -06:00
parent ba088a7a3c
commit 56d5a11049

View File

@ -137,23 +137,26 @@
A block is any chunk of text that can be parsed unambiguously in one pass.
</p>
<ul>
<li>A single line of text containing only inline spans</li>
<li>A block quotation comprising one or more lines</li>
<li>A single line of text comprising one or more spans</li>
<li>A block quotation</li>
<li>A preformatted code block</li>
</ul>
</section2>
<section2 topic='Spans' anchor='span'>
<p>
A span are groups of text that do not result in a line break when rendered
(they are rendered inline) and where the entire group is rendered in the
same manner and in the same block.
A span is a group of text that is rendered inline and where the entire
group is rendered in the same manner.
Spans may be either plain text with no formatting applied, or may be
formatted text that is enclosed by two styling directives.
The following are all single spans:
Spans may not escape from their containing block.
The following all contain spans marked by parenthesis:
</p>
<ul>
<li>plain span</li>
<li><strong>*emphasized span*</strong></li>
<li>(plain span)</li>
<li>(<strong>*strong span*</strong>)</li>
<li>(<em>_emphasized span_</em>)</li>
<li>(<em>_emphasized span containing </em>(<em><strong>*strong span*</strong></em>)<em>_</em>)</li>
<li>(span one )(<strong>*span two*</strong>)</li>
</ul>
<p>
Matches of spans between two styling directives MUST contain some text
@ -170,44 +173,44 @@
styling directives.
</p>
<p>
For example, each of the following would be emphasized as indicated:
For example, each of the following would be styled as indicated:
</p>
<ul>
<li><strong>*emphasized*</strong></li>
<li>foo <strong>*emphasized*</strong> bar</li>
<li><strong>*emphasized*</strong> foo <strong>*emphasized*</strong></li>
<li><strong>*emphasized*</strong>foo*</li>
<li>* foo <strong>*emphasized*</strong></li>
<li><strong>*emphasized *foo*</strong></li>
<li><strong>*strong*</strong></li>
<li>plain <strong>*strong*</strong> plain</li>
<li><strong>*strong*</strong> plain <strong>*strong*</strong></li>
<li><strong>*strong*</strong>plain*</li>
<li>* plain <strong>*strong*</strong></li>
</ul>
<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
new line):
</p>
<ul>
<li>not emphasized*</li>
<li>*not emphasized</li>
<li>*not \n emphasized*</li>
<li>*foo *bar</li>
<li>not strong*</li>
<li>*not strong</li>
<li>*not \n strong*</li>
<li>*not *strong</li>
<li>**</li>
<li>****</li>
</ul>
</section2>
<section2 topic='Bold' anchor='bold'>
<section2 topic='Strong' anchor='strong'>
<p>
Text enclosed by '*' (U+002A ASTERISK) SHOULD be displayed with a greater
weight than the surrounding text (bold face).
Text enclosed by '*' (U+002A ASTERISK) is strong SHOULD be displayed as
bold.
</p>
<example caption='Bold'><![CDATA[
<example caption='Strong'><![CDATA[
<body>
The full title is *Twelfth Night, or What You Will* but
The full title is "Twelfth Night, or What You Will" but
*most* people shorten it.
</body>
]]></example>
</section2>
<section2 topic='Italic' anchor='italic'>
<section2 topic='Emphasis' anchor='emph'>
<p>
Text enclosed by '_' (U+005F LOW LINE) SHOULD be displayed in italics.
Text enclosed by '_' (U+005F LOW LINE) is emphasized and SHOULD be
displayed in italics.
</p>
<example caption='Italic'><![CDATA[
<body>
@ -219,7 +222,7 @@
<section2 topic='Strike through' anchor='strike'>
<p>
Text enclosed by '~' (U+007E TILDE) SHOULD be displayed with a horizontal
line through the middle (strike through).
line through the middle.
</p>
<example caption='Strike through'><![CDATA[
<body>
@ -227,14 +230,14 @@
</body>
]]></example>
</section2>
<section2 topic='Inline Preformatted Text' anchor='pre-inline'>
<section2 topic='Preformatted Span' anchor='mono'>
<p>
Text enclosed by a '`' (U+0060 GRAVE ACCENT) SHOULD be displayed inline in
a monospace font.
Inline formatting directives inside the inline preformatted text are not
Text enclosed by a '`' (U+0060 GRAVE ACCENT) is a preformatted span SHOULD
be displayed inline in a monospace font.
A preformatted span may only contain plaintext.
Inline formatting directives inside the preformatted span are not
rendered.
For example, in the following the word "monospace" is valid pre-formatted
inline text:
For example, the following all contain valid preformatted spans:
</p>
<ul>
<li>This is <tt>`monospace`</tt></li>
@ -247,20 +250,18 @@
</body>
]]></example>
</section2>
<section2 topic='Preformatted Block Text' anchor='pre-block'>
<section2 topic='Preformatted Block' anchor='pre-block'>
<p>
A block of text surrounded by lines consisting of a sequence of three
backticks, "```" (U+0060 GRAVE ACCENT), is preformatted text and should be
displayed exactly as it was entered including whitespace.
If no closing "```" sequence exists, the preformatted block extends to the
end of the input stream or the end of the parent block (whichever comes
first).
No other formatting described in this document should be rendered inside a
preformatted text block.
A preformatted text block is started by a line beginning with "```"
(U+0060 GRAVE ACCENT), and ended by a line containing only three grave
accents or the end of the parent block (whichever comes first).
Preformatted text blocks cannot contain child blocks and other styling
MUST NOT be rendered inside the block.
Text inside a preformatted block SHOULD be displayed in a monospace font.
</p>
<example caption='Preformatted block text'><![CDATA[
<body>
```
```ignored
(println &quot;Hello, world!&quot;)
```