tignore '\r' in writing the blob aswell - stagit - [fork] customized build of stagit, the static git page generator
(HTM) git clone git://src.adamsgaard.dk/stagit
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit ba27f14e8534a17b383c09c63d509aa5a5655f20
(DIR) parent 5b88f7cee4ac2e79072fd7c31e5dafbdfd527faa
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Tue, 16 Nov 2021 14:24:30 +0100
ignore '\r' in writing the blob aswell
Follow-up on commit 295e4b8cb95114bb74b582c7332bc4c171f36dd3 which changed it
for diffs.
Diffstat:
M stagit.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/stagit.c b/stagit.c
t@@ -575,14 +575,15 @@ writeblobhtml(FILE *fp, const git_blob *blob)
continue;
n++;
fprintf(fp, nfmt, n, n, n);
- xmlencode(fp, &s[prev], i - prev + 1);
+ xmlencodeline(fp, &s[prev], i - prev + 1);
+ putc('\n', fp);
prev = i + 1;
}
/* trailing data */
if ((len - prev) > 0) {
n++;
fprintf(fp, nfmt, n, n, n);
- xmlencode(fp, &s[prev], len - prev);
+ xmlencodeline(fp, &s[prev], len - prev);
}
}