-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcore] Parser - invalid raylib_api.json #4323
Comments
@Leopotam Good catch, actually that keyword should be reviewed... |
@raysan5 can be fast fixed in this way: static char *EscapeBackslashes(char *text)
{
static char buffer[256] = {0};
int count = 0;
for (int i = 0; (text[i] != '\0') && (i < 255); i++, count++)
{
// start of fix.
if (text[i] == '"')
{
buffer[count] = '\\';
count++;
}
// end of fix.
buffer[count] = text[i];
if (text[i] == '\\')
{
buffer[count + 1] = '\\';
count++;
}
}
buffer[count] = '\0';
return buffer;
} |
Maybe, buffer size should be increased too (up to 512), for new poetry in api comments. |
@Leopotam Reviewed required tag and buffer size. |
@raysan5 issue not solved - problem in api parser, that doesnt generate proper json file for description field that contains quotes ( |
@Leopotam Thanks for leting me know! Could you send a PR reviewing the issue? Probably replacing the double quoates by simple quotes |
Never mind, fixed it. Let me know if now it works, please! |
it works now, but only before next commit with comment that contains |
@Leopotam I prefer to avoid more code to maintain. |
@raysan5 i see, then better to drop builtin parser and write proper one by myself. thanks for fast fix of |
Sure! That's the spirit of open source! 👍😄 |
Issue description
Paser generates invalid json api file after commit #16e9317220bcede380873d2000c1ccd5062e3f07 by @foxblock -
"
-quotes should be backslashed:"/DIR"
should be\"/DIR\"
The text was updated successfully, but these errors were encountered: