Files
Diagon/test/Sequence/multiline/input
T
tg-m 3a1dfe84ab Add support for new lines in Sequence (#40)
* Add support for new lines in Sequence

When using `diagon Sequence` it is not possible (at least I couldn't
find a way) to add new lines to the messages in the Sequence submodule.

This patch adds parameter `--new_lines_at_bsn` that results in
substituting literal `\n` with new lines.

Example:

```bash
$ echo "Alice -> Bob: send(\n  msg="Hello...",\n  length=8,\n)" | \
       diagon Sequence --new_lines_at_bsn=true
```

output:
```
┌─────┐          ┌───┐
│Alice│          │Bob│
└──┬──┘          └─┬─┘
   │               │
   │send(          │
   │  msg=Hello...,│
   │  length=8,    │
   │)              │
   │──────────────>│
┌──┴──┐          ┌─┴─┐
│Alice│          │Bob│
└─────┘          └───┘
```

* Add tests & refactor.

Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
2022-06-07 22:06:59 +02:00

4 lines
112 B
Plaintext

A -> B: This is a\nmultiline string.
A -> B: This is another\nmultiline string.
B -> A: This is the \nlast one.