mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-28 04:02:20 -05:00
XEP-0393: reorder span and block sections
This commit is contained in:
parent
c35dd875c7
commit
5027edb84f
154
xep-0393.xml
154
xep-0393.xml
@ -202,6 +202,83 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</section1>
|
</section1>
|
||||||
<section1 topic='Business Rules' anchor='rules'>
|
<section1 topic='Business Rules' anchor='rules'>
|
||||||
|
<section2 topic='Blocks' anchor='block'>
|
||||||
|
<p>
|
||||||
|
Parsers implementing message styling will first parse blocks and then
|
||||||
|
parse child blocks or spans if allowed by the specific block type.
|
||||||
|
</p>
|
||||||
|
<section3 topic='Plain' anchor='line-block'>
|
||||||
|
<p>
|
||||||
|
Groups of lines that are not part of any other block are considered a
|
||||||
|
"plain" block, as are individual lines of text that are not inside of a
|
||||||
|
preformatted text block.
|
||||||
|
Plain blocks are not bound by styling directives and do not imply
|
||||||
|
formatting themselves, but they may contain spans which imply
|
||||||
|
formatting.
|
||||||
|
</p>
|
||||||
|
<example caption='Plain block text'><![CDATA[
|
||||||
|
<body>
|
||||||
|
((There are four blocks in this body marked by parens,)
|
||||||
|
(but there is no *formatting)
|
||||||
|
(as spans* may not escape blocks.))
|
||||||
|
</body>
|
||||||
|
]]></example>
|
||||||
|
</section3>
|
||||||
|
<section3 topic='Preformatted Text' anchor='pre-block'>
|
||||||
|
<p>
|
||||||
|
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 "Hello, world!")
|
||||||
|
```
|
||||||
|
|
||||||
|
This should show up as monospace, preformatted text ⤴
|
||||||
|
</body>
|
||||||
|
]]></example>
|
||||||
|
<example caption='No closing preformatted text sequence'><![CDATA[
|
||||||
|
<body>
|
||||||
|
> ```
|
||||||
|
> (println "Hello, world!")
|
||||||
|
|
||||||
|
The entire blockquote is a preformatted text block, but this line is
|
||||||
|
plaintext!
|
||||||
|
</body>
|
||||||
|
]]></example>
|
||||||
|
</section3>
|
||||||
|
<section3 topic='Quotations' anchor='quote'>
|
||||||
|
<p>
|
||||||
|
A quotation is indicated by one or more lines with a byte stream
|
||||||
|
beginning with a '>' (U+003E GREATER-THAN SIGN).
|
||||||
|
Block quotes may contain any child block, including other quotations.
|
||||||
|
Lines inside the block quote MUST have leading spaces trimmed before
|
||||||
|
parsing the child block.
|
||||||
|
It is RECOMMENDED that text inside of a block quote be indented or
|
||||||
|
distinguished from the surrounding text in some other way.
|
||||||
|
</p>
|
||||||
|
<example caption='Quotation (LTR)'><![CDATA[
|
||||||
|
<body>
|
||||||
|
> That that is, is.
|
||||||
|
|
||||||
|
Said the old hermit of Prague.
|
||||||
|
</body>
|
||||||
|
]]></example>
|
||||||
|
<example caption='Nested Quotation'><![CDATA[
|
||||||
|
<body>
|
||||||
|
>> That that is, is.
|
||||||
|
> Said the old hermit of Prague.
|
||||||
|
|
||||||
|
Who?
|
||||||
|
</body>
|
||||||
|
]]></example>
|
||||||
|
</section3>
|
||||||
|
</section2>
|
||||||
<section2 topic='Spans' anchor='span'>
|
<section2 topic='Spans' anchor='span'>
|
||||||
<p>
|
<p>
|
||||||
Matches of spans between two styling directives MUST contain some text
|
Matches of spans between two styling directives MUST contain some text
|
||||||
@ -302,83 +379,6 @@
|
|||||||
<body>
|
<body>
|
||||||
Wow, I can write in `monospace`!
|
Wow, I can write in `monospace`!
|
||||||
</body>
|
</body>
|
||||||
]]></example>
|
|
||||||
</section3>
|
|
||||||
</section2>
|
|
||||||
<section2 topic='Blocks' anchor='block'>
|
|
||||||
<p>
|
|
||||||
Parsers implementing message styling will first parse blocks and then
|
|
||||||
parse child blocks or spans if allowed by the specific block type.
|
|
||||||
</p>
|
|
||||||
<section3 topic='Plain' anchor='line-block'>
|
|
||||||
<p>
|
|
||||||
Groups of lines that are not part of any other block are considered a
|
|
||||||
"plain" block, as are individual lines of text that are not inside of a
|
|
||||||
preformatted text block.
|
|
||||||
Plain blocks are not bound by styling directives and do not imply
|
|
||||||
formatting themselves, but they may contain spans which imply
|
|
||||||
formatting.
|
|
||||||
</p>
|
|
||||||
<example caption='Plain block text'><![CDATA[
|
|
||||||
<body>
|
|
||||||
((There are four blocks in this body marked by parens,)
|
|
||||||
(but there is no *formatting)
|
|
||||||
(as spans* may not escape blocks.))
|
|
||||||
</body>
|
|
||||||
]]></example>
|
|
||||||
</section3>
|
|
||||||
<section3 topic='Preformatted Text' anchor='pre-block'>
|
|
||||||
<p>
|
|
||||||
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 "Hello, world!")
|
|
||||||
```
|
|
||||||
|
|
||||||
This should show up as monospace, preformatted text ⤴
|
|
||||||
</body>
|
|
||||||
]]></example>
|
|
||||||
<example caption='No closing preformatted text sequence'><![CDATA[
|
|
||||||
<body>
|
|
||||||
> ```
|
|
||||||
> (println "Hello, world!")
|
|
||||||
|
|
||||||
The entire blockquote is a preformatted text block, but this line is
|
|
||||||
plaintext!
|
|
||||||
</body>
|
|
||||||
]]></example>
|
|
||||||
</section3>
|
|
||||||
<section3 topic='Quotations' anchor='quote'>
|
|
||||||
<p>
|
|
||||||
A quotation is indicated by one or more lines with a byte stream
|
|
||||||
beginning with a '>' (U+003E GREATER-THAN SIGN).
|
|
||||||
Block quotes may contain any child block, including other quotations.
|
|
||||||
Lines inside the block quote MUST have leading spaces trimmed before
|
|
||||||
parsing the child block.
|
|
||||||
It is RECOMMENDED that text inside of a block quote be indented or
|
|
||||||
distinguished from the surrounding text in some other way.
|
|
||||||
</p>
|
|
||||||
<example caption='Quotation (LTR)'><![CDATA[
|
|
||||||
<body>
|
|
||||||
> That that is, is.
|
|
||||||
|
|
||||||
Said the old hermit of Prague.
|
|
||||||
</body>
|
|
||||||
]]></example>
|
|
||||||
<example caption='Nested Quotation'><![CDATA[
|
|
||||||
<body>
|
|
||||||
>> That that is, is.
|
|
||||||
> Said the old hermit of Prague.
|
|
||||||
|
|
||||||
Who?
|
|
||||||
</body>
|
|
||||||
]]></example>
|
]]></example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
|
Loading…
Reference in New Issue
Block a user