Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiline: Specify behavior with respect to formatting. #499

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions extensions/multiline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -182,6 +184,8 @@ This section is non-normative.

NOTE: In these examples, `<SPACE>` indicates a space character which would otherwise not be clearly visible.

### Normal usage

Client sending a mutliline batch

Client: BATCH +123 draft/multiline #channel
Expand All @@ -206,16 +210,52 @@ Server sending messages to clients without multiline support
Server: @account=account :n!u@h PRIVMSG #channel :how is<SPACE>
Server: @account=account :n!u@h PRIVMSG #channel :everyone?

Final concatenated message
Final concatenated message:

hello
<pre>
hello

how is everyone?
how is everyone?
</pre>

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:

<pre>
this is not bold <strong>but this is</strong>
<strong>and this is still bold</strong>
but this is not
</pre>

---

And this works the same

Client: BATCH +123 draft/multiline #channel
Client: @batch=123 PRIVMSG #channel :this is not bold, <0x02>but this is,<SPACE>
Client: @batch=123;draft/multiline-concat PRIVMSG #channel :<0x02>this is still bold,<SPACE>
Client: @batch=123;draft/multiline-concat PRIVMSG #channel :but this is not
Client: BATCH -123

Final concatenated message:

<pre>
this is not bold <strong>but this is, and this is still bold</strong> but this is not
</pre>

### Error cases

Invalid multiline batch target

Client: BATCH +456 draft/multiline #foo
Expand Down