aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitf4f4629c2afc1c20003c12753c35528bd807708a (patch)
tree6997e819a3f1fcf467b4f433a29078d073df1fd7 /main.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 'main.c')
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index 36eb565d..74912cf5 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.318 2019/01/11 17:04:44 schwarze Exp $ */
+/* $Id: main.c,v 1.319 2019/03/03 13:02:11 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);