Use YAML block-literal syntax to avoid wrapped lines.
In vspeak(), andle text with extra trailing \n.
This commit is contained in:
parent
030fa6d27d
commit
ba9e933f20
2 changed files with 528 additions and 130 deletions
653
adventure.yaml
653
adventure.yaml
File diff suppressed because it is too large
Load diff
5
misc.c
5
misc.c
|
@ -243,6 +243,11 @@ void vspeak(const char* msg, va_list ap)
|
|||
}
|
||||
*renderp = 0;
|
||||
|
||||
// Deal with messages that are in YAML block format and therefore
|
||||
// have their own trailing \n
|
||||
if (renderp > rendered && renderp[-1] == '\n')
|
||||
*--renderp = '\0';
|
||||
|
||||
// Print the message.
|
||||
printf("%s\n", rendered);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue