about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-11-29 17:44:32 -0500
committerJune McEnroe <june@causal.agency>2020-11-29 17:44:32 -0500
commitaa5164b8fad3137f68a14a11bcc188c76f70e96d (patch)
treedc62a384dfc80b135cd930c59ca9d4ee8d375612
parentUse open_memstream for section specs (diff)
downloadbubger-aa5164b8fad3137f68a14a11bcc188c76f70e96d.tar.gz
bubger-aa5164b8fad3137f68a14a11bcc188c76f70e96d.zip
Fix section spec of multipart/alternative fallback export
They were being exported with paths like
"attachment/messageID//INLINE.HTML".
-rw-r--r--export.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/export.c b/export.c
index 1b6d298..f060c0b 100644
--- a/export.c
+++ b/export.c
@@ -231,11 +231,15 @@ static int exportHTMLBody(
 				&part->parts.ptr[i], dataCheck(body, List).list.ptr[i]
 			);
 		}
-		return exportHTMLBody(
+		struct Data num = { .type = Number, .number = part->parts.len };
+		listPush(section, num);
+		int error = exportHTMLBody(
 			file, envelope, section,
 			&part->parts.ptr[part->parts.len - 1],
 			dataCheck(body, List).list.ptr[part->parts.len - 1]
 		);
+		section->len--;
+		return error;
 
 	} else if (part->multipart) {
 		int error;
ef='/src/commit/www/causal.agency/style.css?id=e15ee8179e2ba9ed193087847abf5ee29e5ff2ec&follow=1'>Style causal.agency like bin HTMLJune McEnroe 2021-01-12Avoid matching tag text inside HTML elementsJune McEnroe 2021-01-12Use hilex for up -hJune McEnroe 2021-01-12Use hilex for bin HTMLJune McEnroe 2021-01-12Don't output a pre in hilex by defaultJune McEnroe 2021-01-12Move hilex out of hilex directoryJune McEnroe 2021-01-12Consolidate hilex formatters into hilex.cJune McEnroe 2021-01-12Remove hacky tagging from hilexJune McEnroe God that makes the lexers so much simpler. 2021-01-12Add htagml -iJune McEnroe 2021-01-12Render tag index in HTMLJune McEnroe 2021-01-12Add htagml -xJune McEnroe 2021-01-12Prevent matching the same tag twiceJune McEnroe 2021-01-12Process htagml file line by lineJune McEnroe This simplifies some things, adds support for line number tag definitions, and should enable combining htagml with other preprocessors in the future. 2021-01-12Split fields by tab onlyJune McEnroe Also don't fail hard on non-forward-search definitions. 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe