diff options
| author | Simon Tatham <anakin@pobox.com> | 2001-12-14 12:59:34 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2001-12-14 12:59:34 +0000 |
| commit | 1e43991a687d30949a8fb63b21c93ceae1bd7ad0 (patch) | |
| tree | c609e4621e89d0a2f1f2e08a6b9cc9f3cf4a0cad /input.c | |
| parent | ed0c45541c37742ebf3a8361aeba32c8605483f3 (diff) | |
| download | halibut-1e43991a687d30949a8fb63b21c93ceae1bd7ad0.zip halibut-1e43991a687d30949a8fb63b21c93ceae1bd7ad0.tar.gz halibut-1e43991a687d30949a8fb63b21c93ceae1bd7ad0.tar.bz2 halibut-1e43991a687d30949a8fb63b21c93ceae1bd7ad0.tar.xz | |
Buttress was dealing poorly with \r in input files (though not _too_
poorly; mostly it just treated \r as whitespace, and the only time
it actually suffered was at the end of a line in a code paragraph).
Should now be fixed.
[originally from svn r1492]
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -448,8 +448,11 @@ token get_codepar_token(input *in) { ret.pos = cpos; } while (!isnl(c) && c != EOF) { - rdadd(&rs, c); + int c2 = c; c = get(in, &cpos); + /* Discard \r just before \n. */ + if (c2 != 13 || !isnl(c)) + rdadd(&rs, c2); } unget(in, c, &cpos); ret.text = ustrdup(rs.text); |