aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocd.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-03-03 13:02:11 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-03-03 13:02:11 +0000
commitf4f4629c2afc1c20003c12753c35528bd807708a (patch)
tree6997e819a3f1fcf467b4f433a29078d073df1fd7 /mandocd.c
parentfcbf62db4a9cb9f6fe8df047ee6ee41fee8dab76 (diff)
downloadmandoc-f4f4629c2afc1c20003c12753c35528bd807708a.tar.gz
mandoc-f4f4629c2afc1c20003c12753c35528bd807708a.tar.zst
mandoc-f4f4629c2afc1c20003c12753c35528bd807708a.zip
Reset HTML formatter state, in particular the id_unique hash,
after processing each manual page, such that the next page starts from a clean state and doesn't continue suffix numbering. Issue found while looking at https://github.com/Debian/debiman/issues/48 which was brought up by Orestis Ioannou <oorestisime at github>.
Diffstat (limited to 'mandocd.c')
-rw-r--r--mandocd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mandocd.c b/mandocd.c
index b8b5570d..1a597b38 100644
--- a/mandocd.c
+++ b/mandocd.c
@@ -1,7 +1,7 @@
-/* $Id: mandocd.c,v 1.10 2019/03/03 11:01:15 schwarze Exp $ */
+/* $Id: mandocd.c,v 1.11 2019/03/03 13:02:11 schwarze Exp $ */
/*
* Copyright (c) 2017 Michael Stapelberg <stapelberg@debian.org>
- * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2017, 2019 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -213,6 +213,8 @@ main(int argc, char *argv[])
process(parser, outtype, formatter);
mparse_reset(parser);
+ if (outtype == OUTT_HTML)
+ html_reset(formatter);
fflush(stdout);
fflush(stderr);