mirror of
https://github.com/ArthurSonzogni/Diagon.git
synced 2026-08-29 16:40:45 +08:00
3a1dfe84ab
* 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>
4 lines
112 B
Plaintext
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.
|