mirror of https://github.com/mgba-emu/mgba.git
Scripting: Fix value docstrings with newlines
This commit is contained in:
parent
6fc8195177
commit
e4a5a3f2db
|
@ -301,7 +301,12 @@ void explainValueScoped(struct mScriptValue* value, const char* name, const char
|
|||
}
|
||||
}
|
||||
if (docstring) {
|
||||
fprintf(out, "%scomment: \"%s\"\n", indent, docstring);
|
||||
if (strchr(docstring, '\n')) {
|
||||
fprintf(out, "%scomment: |-\n", indent);
|
||||
printchomp(docstring, level + 1);
|
||||
} else {
|
||||
fprintf(out, "%scomment: \"%s\"\n", indent, docstring);
|
||||
}
|
||||
}
|
||||
|
||||
switch (value->type->base) {
|
||||
|
|
Loading…
Reference in New Issue