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>
16 lines
485 B
Plaintext
16 lines
485 B
Plaintext
┌─┐ ┌─┐
|
|
│A│ │B│
|
|
└┬┘ └┬┘
|
|
│ │
|
|
│──┐ │
|
|
│ │ message │
|
|
│ │ number │
|
|
│ │ 2 │
|
|
│───────────────>│
|
|
│ │ │
|
|
│message number 1│
|
|
│ └────────────>│
|
|
┌┴┐ ┌┴┐
|
|
│A│ │B│
|
|
└─┘ └─┘
|