From 93d0c8d4e4751a7328b5aa1b836aaa9fcad230fc Mon Sep 17 00:00:00 2001 From: Demonstrandum Date: Thu, 6 Aug 2020 03:24:52 +0100 Subject: [PATCH] Move markdown article outside blob. --- highlight | 5 ++++- stagit.c | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/highlight b/highlight index 89cd984..28b1891 100755 --- a/highlight +++ b/highlight @@ -44,10 +44,13 @@ if rendered: print('
') print(rendered) print('
') +print('
') print(highlight(contents, lexer, FORMAT)) +print('
') print('') print("Filename: {}; Lexer: {}.".format(filename, lexer), file=stderr) -print("Markdown was rendered in addition.", file=stderr) +if rendered: + print("Markdown was rendered in addition.", file=stderr) diff --git a/stagit.c b/stagit.c index 98a1830..7c88263 100644 --- a/stagit.c +++ b/stagit.c @@ -434,14 +434,10 @@ writeblobhtml(const char *filename, FILE *fp, const git_blob *blob) const char *s = git_blob_rawcontent(blob); git_off_t len = git_blob_rawsize(blob); - fputs("
\n", fp); - if (len > 0) { lc = syntax_highlight(filename, fp, s, len); } - fputs("
\n", fp); - return lc; } -- 2.39.2