diff options
author | June McEnroe <june@causal.agency> | 2020-04-16 20:03:12 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-04-16 20:03:12 -0400 |
commit | 6b0d631a171192d4d9d5ccc6acabb307fee5fa22 (patch) | |
tree | 1d406ef9428199bdd56c7a5dcd26bb0d90cd9fab /html.c | |
parent | Decode Q encoding (diff) | |
download | bubger-6b0d631a171192d4d9d5ccc6acabb307fee5fa22.tar.gz bubger-6b0d631a171192d4d9d5ccc6acabb307fee5fa22.zip |
Decode quoted-printable and 7bit/8bit
Diffstat (limited to '')
-rw-r--r-- | html.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/html.c b/html.c index 11bc244..677b4aa 100644 --- a/html.c +++ b/html.c @@ -143,10 +143,13 @@ int htmlMessageOpen(FILE *file, const struct Envelope *envelope) { return error; } -int htmlInlineOpen(FILE *file, const struct BodyPart *part) { +int htmlInline(FILE *file, const struct BodyPart *part, const char *content) { // TODO: Include Content-Id as id? + // TODO: format=flowed. + // TODO: Process quoting. + // TODO: Highlight patches. const char *template = TEMPLATE( - <pre lang="[lang]"> + <pre lang="[lang]">[content]</pre> ); const char *lang = ""; // FIXME: part->language should be more structured. @@ -155,15 +158,12 @@ int htmlInlineOpen(FILE *file, const struct BodyPart *part) { } struct Variable vars[] = { { "lang", lang }, + { "content", content }, {0}, }; return templateRender(file, template, vars, escapeXML); } -int htmlInlineClose(FILE *file) { - return templateRender(file, TEMPLATE(</pre>), NULL, NULL); -} - int htmlMessageClose(FILE *file) { return templateRender(file, TEMPLATE(</article>), NULL, NULL); } |