mirror of
https://github.com/moparisthebest/xeps
synced 2025-02-16 07:10:15 -05:00
styling: more cleanup and feedback addressed
This commit is contained in:
parent
ba088a7a3c
commit
56d5a11049
@ -137,23 +137,26 @@
|
|||||||
A block is any chunk of text that can be parsed unambiguously in one pass.
|
A block is any chunk of text that can be parsed unambiguously in one pass.
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>A single line of text containing only inline spans</li>
|
<li>A single line of text comprising one or more spans</li>
|
||||||
<li>A block quotation comprising one or more lines</li>
|
<li>A block quotation</li>
|
||||||
<li>A preformatted code block</li>
|
<li>A preformatted code block</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Spans' anchor='span'>
|
<section2 topic='Spans' anchor='span'>
|
||||||
<p>
|
<p>
|
||||||
A span are groups of text that do not result in a line break when rendered
|
A span is a group of text that is rendered inline and where the entire
|
||||||
(they are rendered inline) and where the entire group is rendered in the
|
group is rendered in the same manner.
|
||||||
same manner and in the same block.
|
|
||||||
Spans may be either plain text with no formatting applied, or may be
|
Spans may be either plain text with no formatting applied, or may be
|
||||||
formatted text that is enclosed by two styling directives.
|
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>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>plain span</li>
|
<li>(plain span)</li>
|
||||||
<li><strong>*emphasized span*</strong></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>
|
</ul>
|
||||||
<p>
|
<p>
|
||||||
Matches of spans between two styling directives MUST contain some text
|
Matches of spans between two styling directives MUST contain some text
|
||||||
@ -170,44 +173,44 @@
|
|||||||
styling directives.
|
styling directives.
|
||||||
</p>
|
</p>
|
||||||
<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>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><strong>*emphasized*</strong></li>
|
<li><strong>*strong*</strong></li>
|
||||||
<li>foo <strong>*emphasized*</strong> bar</li>
|
<li>plain <strong>*strong*</strong> plain</li>
|
||||||
<li><strong>*emphasized*</strong> foo <strong>*emphasized*</strong></li>
|
<li><strong>*strong*</strong> plain <strong>*strong*</strong></li>
|
||||||
<li><strong>*emphasized*</strong>foo*</li>
|
<li><strong>*strong*</strong>plain*</li>
|
||||||
<li>* foo <strong>*emphasized*</strong></li>
|
<li>* plain <strong>*strong*</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
|
||||||
new line):
|
new line):
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>not emphasized*</li>
|
<li>not strong*</li>
|
||||||
<li>*not emphasized</li>
|
<li>*not strong</li>
|
||||||
<li>*not \n emphasized*</li>
|
<li>*not \n strong*</li>
|
||||||
<li>*foo *bar</li>
|
<li>*not *strong</li>
|
||||||
<li>**</li>
|
<li>**</li>
|
||||||
<li>****</li>
|
<li>****</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Bold' anchor='bold'>
|
<section2 topic='Strong' anchor='strong'>
|
||||||
<p>
|
<p>
|
||||||
Text enclosed by '*' (U+002A ASTERISK) SHOULD be displayed with a greater
|
Text enclosed by '*' (U+002A ASTERISK) is strong SHOULD be displayed as
|
||||||
weight than the surrounding text (bold face).
|
bold.
|
||||||
</p>
|
</p>
|
||||||
<example caption='Bold'><![CDATA[
|
<example caption='Strong'><![CDATA[
|
||||||
<body>
|
<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.
|
*most* people shorten it.
|
||||||
</body>
|
</body>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Italic' anchor='italic'>
|
<section2 topic='Emphasis' anchor='emph'>
|
||||||
<p>
|
<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>
|
</p>
|
||||||
<example caption='Italic'><![CDATA[
|
<example caption='Italic'><![CDATA[
|
||||||
<body>
|
<body>
|
||||||
@ -219,7 +222,7 @@
|
|||||||
<section2 topic='Strike through' anchor='strike'>
|
<section2 topic='Strike through' anchor='strike'>
|
||||||
<p>
|
<p>
|
||||||
Text enclosed by '~' (U+007E TILDE) SHOULD be displayed with a horizontal
|
Text enclosed by '~' (U+007E TILDE) SHOULD be displayed with a horizontal
|
||||||
line through the middle (strike through).
|
line through the middle.
|
||||||
</p>
|
</p>
|
||||||
<example caption='Strike through'><![CDATA[
|
<example caption='Strike through'><![CDATA[
|
||||||
<body>
|
<body>
|
||||||
@ -227,14 +230,14 @@
|
|||||||
</body>
|
</body>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Inline Preformatted Text' anchor='pre-inline'>
|
<section2 topic='Preformatted Span' anchor='mono'>
|
||||||
<p>
|
<p>
|
||||||
Text enclosed by a '`' (U+0060 GRAVE ACCENT) SHOULD be displayed inline in
|
Text enclosed by a '`' (U+0060 GRAVE ACCENT) is a preformatted span SHOULD
|
||||||
a monospace font.
|
be displayed inline in a monospace font.
|
||||||
Inline formatting directives inside the inline preformatted text are not
|
A preformatted span may only contain plaintext.
|
||||||
|
Inline formatting directives inside the preformatted span are not
|
||||||
rendered.
|
rendered.
|
||||||
For example, in the following the word "monospace" is valid pre-formatted
|
For example, the following all contain valid preformatted spans:
|
||||||
inline text:
|
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>This is <tt>`monospace`</tt></li>
|
<li>This is <tt>`monospace`</tt></li>
|
||||||
@ -247,20 +250,18 @@
|
|||||||
</body>
|
</body>
|
||||||
]]></example>
|
]]></example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Preformatted Block Text' anchor='pre-block'>
|
<section2 topic='Preformatted Block' anchor='pre-block'>
|
||||||
<p>
|
<p>
|
||||||
A block of text surrounded by lines consisting of a sequence of three
|
A preformatted text block is started by a line beginning with "```"
|
||||||
backticks, "```" (U+0060 GRAVE ACCENT), is preformatted text and should be
|
(U+0060 GRAVE ACCENT), and ended by a line containing only three grave
|
||||||
displayed exactly as it was entered including whitespace.
|
accents or the end of the parent block (whichever comes first).
|
||||||
If no closing "```" sequence exists, the preformatted block extends to the
|
Preformatted text blocks cannot contain child blocks and other styling
|
||||||
end of the input stream or the end of the parent block (whichever comes
|
MUST NOT be rendered inside the block.
|
||||||
first).
|
Text inside a preformatted block SHOULD be displayed in a monospace font.
|
||||||
No other formatting described in this document should be rendered inside a
|
|
||||||
preformatted text block.
|
|
||||||
</p>
|
</p>
|
||||||
<example caption='Preformatted block text'><![CDATA[
|
<example caption='Preformatted block text'><![CDATA[
|
||||||
<body>
|
<body>
|
||||||
```
|
```ignored
|
||||||
(println "Hello, world!")
|
(println "Hello, world!")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user