From 5027edb84f573033a9f247b69d35d91427662839 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Thu, 15 Feb 2018 15:20:08 -0600 Subject: [PATCH 1/4] XEP-0393: reorder span and block sections --- xep-0393.xml | 154 +++++++++++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/xep-0393.xml b/xep-0393.xml index 61e7ad02..051fb38c 100644 --- a/xep-0393.xml +++ b/xep-0393.xml @@ -202,6 +202,83 @@ + +

+ Parsers implementing message styling will first parse blocks and then + parse child blocks or spans if allowed by the specific block type. +

+ +

+ 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. +

+ + ((There are four blocks in this body marked by parens,) + (but there is no *formatting) + (as spans* may not escape blocks.)) + +]]> +
+ +

+ 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. +

+ + ```ignored + (println "Hello, world!") + ``` + + This should show up as monospace, preformatted text ⤴ + +]]> + + > ``` + > (println "Hello, world!") + + The entire blockquote is a preformatted text block, but this line is + plaintext! + +]]> +
+ +

+ 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. +

+ + > That that is, is. + + Said the old hermit of Prague. + +]]> + + >> That that is, is. + > Said the old hermit of Prague. + + Who? + +]]> +
+

Matches of spans between two styling directives MUST contain some text @@ -302,83 +379,6 @@ Wow, I can write in `monospace`! -]]> - - - -

- Parsers implementing message styling will first parse blocks and then - parse child blocks or spans if allowed by the specific block type. -

- -

- 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. -

- - ((There are four blocks in this body marked by parens,) - (but there is no *formatting) - (as spans* may not escape blocks.)) - -]]> -
- -

- 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. -

- - ```ignored - (println "Hello, world!") - ``` - - This should show up as monospace, preformatted text ⤴ - -]]> - - > ``` - > (println "Hello, world!") - - The entire blockquote is a preformatted text block, but this line is - plaintext! - -]]> -
- -

- 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. -

- - > That that is, is. - - Said the old hermit of Prague. - -]]> - - >> That that is, is. - > Said the old hermit of Prague. - - Who? - ]]>
From 60df13b76dda006bfa029c0345b15645ecf1469b Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Thu, 15 Feb 2018 15:22:06 -0600 Subject: [PATCH 2/4] XEP-0393: rework definition of a span --- xep-0393.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xep-0393.xml b/xep-0393.xml index 051fb38c..1db8e336 100644 --- a/xep-0393.xml +++ b/xep-0393.xml @@ -164,12 +164,12 @@
Span
- A group of text that is rendered inline and where the entire group is - rendered in the same manner. + A group of text that may be rendered inline alongside other spans. Spans may be either plain text with no formatting applied, or may be formatted text that is enclosed by two styling directives. Spans are always children of blocks and may not escape from their containing block. + Some spans may contain child spans. The following all contain spans marked by parenthesis:
  • (plain span)
  • @@ -428,4 +428,7 @@

    This document does not define any new XML structure requiring a schema.

    + +

    The author wishes to thank Kevin Smith for his review and feedback.

    +
    From 15faf862c6f7513f9b785975a08920e05bc5200d Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Thu, 15 Feb 2018 15:22:28 -0600 Subject: [PATCH 3/4] XEP-0393: simplify block parsing --- xep-0393.xml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/xep-0393.xml b/xep-0393.xml index 1db8e336..5c59a94b 100644 --- a/xep-0393.xml +++ b/xep-0393.xml @@ -25,6 +25,17 @@ styling &sam; + + 0.1.3 + 2018-02-14 + ssw + +

    + Reorder block and span sections, simplify block parsing, and update the + definition of a span. +

    +
    +
    0.1.2 2018-01-13 @@ -209,18 +220,18 @@

    - 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. + Individual lines of text that are not inside of a preformatted text + block are considered a "plain" block. Plain blocks are not bound by styling directives and do not imply formatting themselves, but they may contain spans which imply formatting. + Plain blocks may not contain child blocks.

    - ((There are four blocks in this body marked by parens,) + (There are three blocks in this body marked by parens,) (but there is no *formatting) - (as spans* may not escape blocks.)) + (as spans* may not escape blocks.) ]]>
    @@ -229,8 +240,7 @@ 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. + Preformatted text blocks cannot contain child blocks or spans. Text inside a preformatted block SHOULD be displayed in a monospace font.

    ]]> From 6cfae3b235488a0a1a9e6394ca0a41a4ddcec2f3 Mon Sep 17 00:00:00 2001 From: Sam Whited Date: Thu, 15 Feb 2018 15:24:16 -0600 Subject: [PATCH 4/4] XEP-0393: mark as superseding XEP-0071 --- xep-0393.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xep-0393.xml b/xep-0393.xml index 5c59a94b..4ff7a68a 100644 --- a/xep-0393.xml +++ b/xep-0393.xml @@ -21,7 +21,7 @@ XMPP Core XEP-0001 - + XEP-0071 styling &sam;