summary refs log tree commit diff
path: root/bin/hilex/hilex.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-12-29 00:55:47 -0500
committerJune McEnroe <june@causal.agency>2020-12-29 00:55:47 -0500
commit1e284c0b01081e731be45d1b29b49d4540ae3c2c (patch)
tree8e637d4fb2bcdcd31925ce383442e6f119d28691 /bin/hilex/hilex.c
parentAdd hilex manual page (diff)
downloadsrc-1e284c0b01081e731be45d1b29b49d4540ae3c2c.tar.gz
src-1e284c0b01081e731be45d1b29b49d4540ae3c2c.zip
Add hilex HTML output
Diffstat (limited to 'bin/hilex/hilex.c')
-rw-r--r--bin/hilex/hilex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/hilex/hilex.c b/bin/hilex/hilex.c
index 089f85ee..43130f4d 100644
--- a/bin/hilex/hilex.c
+++ b/bin/hilex/hilex.c
@@ -63,6 +63,7 @@ static const struct {
 } Formatters[] = {
 	{ &FormatANSI, "ansi" },
 	{ &FormatDebug, "debug" },
+	{ &FormatHTML, "html" },
 	{ &FormatIRC, "irc" },
 };
 
@@ -135,6 +136,7 @@ int main(int argc, char *argv[]) {
 			name = path;
 		}
 	}
+	if (!opts[Title]) opts[Title] = name;
 	if (!lexer) lexer = matchLexer(name);
 	if (!lexer && text) lexer = &LexText;
 	if (!lexer) errx(EX_USAGE, "cannot infer lexer for %s", name);