From 3463d1862995d65c70e398e3440218572bec5a97 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 22 Apr 2022 20:38:47 +0200 Subject: [PATCH 1/2] multiline: Specify behavior with respect to formatting. Tthis is the only way to format the fallback for multiline-unaware clients the same way as for multiline-aware clients --- extensions/multiline.md | 46 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/extensions/multiline.md b/extensions/multiline.md index 9c1d47132..0cb68e29d 100644 --- a/extensions/multiline.md +++ b/extensions/multiline.md @@ -75,6 +75,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. @@ -182,6 +184,8 @@ This section is non-normative. NOTE: In these examples, `` indicates a space character which would otherwise not be clearly visible. +### Normal usage + Client sending a mutliline batch Client: BATCH +123 draft/multiline #channel @@ -206,16 +210,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 From f4ff0165c48161a9f8cfb3cdf289660f0385265e Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Mon, 1 Dec 2025 08:51:56 +0100 Subject: [PATCH 2/2] Fix example Co-authored-by: JustAnotherArchivist --- extensions/multiline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/multiline.md b/extensions/multiline.md index 0cb68e29d..0567355ae 100644 --- a/extensions/multiline.md +++ b/extensions/multiline.md @@ -251,7 +251,7 @@ And this works the same Final concatenated message:
-this is not bold but this is, and this is still bold but this is not
+this is not bold but this is, and this is still bold but this is not
 
### Error cases