Tue, 23 Aug 2016 13:59:48 +0200
fixes plaintext output
src/c2html.c | file | annotate | diff | comparison | revisions |
--- a/src/c2html.c Tue Aug 23 13:49:38 2016 +0200 +++ b/src/c2html.c Tue Aug 23 13:59:48 2016 +0200 @@ -99,10 +99,11 @@ } else { char *c = sourceline->data; size_t dp = 0; - while (*c) { + while (*c && *c != '\n') { dp = writeescapedchar(line->space, dp, *c); c++; } + line->space[dp++] = '\n'; line->space[dp] = '\0'; }