mirror of https://github.com/mgba-emu/mgba.git
Scripting: Fix member docstrings with newlines
This commit is contained in:
parent
0c33863e66
commit
7719dd5ec4
|
@ -230,7 +230,12 @@ void explainClass(struct mScriptTypeClass* cls, int level) {
|
||||||
case mSCRIPT_CLASS_INIT_INSTANCE_MEMBER:
|
case mSCRIPT_CLASS_INIT_INSTANCE_MEMBER:
|
||||||
fprintf(out, "%s %s:\n", indent, details->info.member.name);
|
fprintf(out, "%s %s:\n", indent, details->info.member.name);
|
||||||
if (docstring) {
|
if (docstring) {
|
||||||
|
if (strchr(docstring, '\n')) {
|
||||||
|
fprintf(out, "%s comment: |-\n", indent);
|
||||||
|
printchomp(docstring, level + 3);
|
||||||
|
} else {
|
||||||
fprintf(out, "%s comment: \"%s\"\n", indent, docstring);
|
fprintf(out, "%s comment: \"%s\"\n", indent, docstring);
|
||||||
|
}
|
||||||
docstring = NULL;
|
docstring = NULL;
|
||||||
}
|
}
|
||||||
fprintf(out, "%s type: %s\n", indent, details->info.member.type->name);
|
fprintf(out, "%s type: %s\n", indent, details->info.member.type->name);
|
||||||
|
|
Loading…
Reference in New Issue