summary refs log tree commit diff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c12
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);
 }