1
0
mirror of https://github.com/janet-lang/janet synced 2025-11-25 03:34:49 +00:00

Ensure no carriage returns end up in doc strings.

This commit is contained in:
Calvin Rose
2019-07-12 09:14:37 -04:00
parent 2e6ee39506
commit e528b86a2a
3 changed files with 10 additions and 6 deletions

View File

@@ -294,7 +294,7 @@ static int stringchar(JanetParser *p, JanetParseState *state, uint8_t c) {
return stringend(p, state);
}
/* normal char */
if (c != '\n')
if (c != '\n' && c != '\r')
push_buf(p, c);
return 1;
}