From: Demonstrandum Date: Thu, 6 Aug 2020 02:24:52 +0000 (+0100) Subject: Move markdown article outside blob. X-Git-Url: https://git.armaanb.net/?p=stagit.git;a=commitdiff_plain;h=93d0c8d4e4751a7328b5aa1b836aaa9fcad230fc Move markdown article outside blob. --- 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; }