diff --git a/extensions/multiline.md b/extensions/multiline.md index 8b6e645b..254c2446 100644 --- a/extensions/multiline.md +++ b/extensions/multiline.md @@ -77,6 +77,8 @@ The combined message value of a multiline batch is defined as the concatenation Each line feed used to join line messages contributes one byte towards the `max-bytes` limit. No line feed is appended to the final line message of a batch. +Each message in the batch starts with the default formatting state; as if messages were joined by a format reset character (`\x0f`). + Servers MUST NOT reject blank lines other than in the following cases: * Clients MUST NOT send blank lines with the `draft/multiline-concat` tag. @@ -184,7 +186,9 @@ This section is non-normative. NOTE: In these examples, `` indicates a space character which would otherwise not be clearly visible. -Client sending a multiline batch +### Normal usage + +Client sending a mutliline batch Client: BATCH +123 draft/multiline #channel Client: @batch=123 PRIVMSG #channel hello @@ -208,16 +212,52 @@ Server sending messages to clients without multiline support Server: @account=account :n!u@h PRIVMSG #channel :how is Server: @account=account :n!u@h PRIVMSG #channel :everyone? -Final concatenated message +Final concatenated message: - hello +
+hello
 
-    how is everyone?
+how is everyone?
+
This example is also valid if every instance of PRIVMSG is replaced with NOTICE. +### Formatting + +Formatting control codes must be repeated at the beginning of each line: + + Client: BATCH +123 draft/multiline #channel + Client: @batch=123 PRIVMSG #channel :this is not bold, <0x02>but this is + Client: @batch=123 PRIVMSG #channel :<0x02>and this is still bold + Client: @batch=123 PRIVMSG #channel :but this is not + Client: BATCH -123 + +Final concatenated message: + +
+this is not bold but this is
+and this is still bold
+but this is not
+
+ --- +And this works the same + + Client: BATCH +123 draft/multiline #channel + Client: @batch=123 PRIVMSG #channel :this is not bold, <0x02>but this is, + Client: @batch=123;draft/multiline-concat PRIVMSG #channel :<0x02>this is still bold, + Client: @batch=123;draft/multiline-concat PRIVMSG #channel :but this is not + Client: BATCH -123 + +Final concatenated message: + +
+this is not bold but this is, and this is still bold but this is not
+
+ +### Error cases + Invalid multiline batch target Client: BATCH +456 draft/multiline #foo