summaryrefslogtreecommitdiffstats
path: root/main.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
commit8816b91eee3bcfacd831e3cefe5da84702ba2b03 (patch)
tree7e81ded606c17f5f321eabff09e1a6d1e495f582 /main.c
parentb4303641a5d76b39d16c4c9d86f415dff39f8c68 (diff)
downloadmandoc-8816b91eee3bcfacd831e3cefe5da84702ba2b03.tar.gz
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 'main.c')
-rw-r--r--main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/main.c b/main.c
index 1484eb90..8654976b 100644
--- a/main.c
+++ b/main.c
@@ -835,6 +835,8 @@ parse(struct curparse *curp, int fd, const char *file)
if (curp->outdata == NULL)
outdata_alloc(curp);
+ else if (curp->outtype == OUTT_HTML)
+ html_reset(curp);
mandoc_xr_reset();
meta = mparse_result(curp->mp);