stagit

Fork of `stagit` for git.knutsen.co.
git clone git://git.knutsen.co/stagit
Log | Files | Refs | README | LICENSE

commit 93d0c8d4e4751a7328b5aa1b836aaa9fcad230fc
parent 937b2d1357e9e9d702519855bc78fe2cecc9b08e
Author: Demonstrandum <moi@knutsen.co>
Date:   Thu,  6 Aug 2020 03:24:52 +0100

Move markdown article outside blob.

Diffstat:
Mhighlight | 5++++-
Mstagit.c | 4----
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/highlight b/highlight @@ -44,10 +44,13 @@ if rendered: print('<article class="markup markdown">') print(rendered) print('</article>') +print('<div id="blob">') print(highlight(contents, lexer, FORMAT)) +print('</div>') print('<style>') print(FORMAT.get_style_defs('')) print('</style>') 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 @@ -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("<div id=\"blob\">\n", fp); - if (len > 0) { lc = syntax_highlight(filename, fp, s, len); } - fputs("</div>\n", fp); - return lc; }