\<space><newline><space> should only skip one line

This commit is contained in:
Alex Shinn 2013-05-28 21:24:21 +09:00
parent 20a2c02b19
commit 99d9203362

6
sexp.c
View file

@ -2158,7 +2158,11 @@ sexp sexp_read_string (sexp ctx, sexp in, int sentinel) {
break;
#if SEXP_USE_ESCAPE_NEWLINE
default:
if (isspace(c)) while (isspace(c) && c!=EOF) c=sexp_read_char(ctx, in);
if (isspace(c)) {
while (c==' ' || c=='\t') c=sexp_read_char(ctx, in);
if (c=='\r') c=sexp_read_char(ctx, in);
if (c=='\n') do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t');
}
#endif
}
if (sexp_exceptionp(res)) break;