diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-03 13:02:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2019-03-03 13:02:11 +0000 |
commit | f4f4629c2afc1c20003c12753c35528bd807708a (patch) | |
tree | 6997e819a3f1fcf467b4f433a29078d073df1fd7 /main.c | |
parent | fcbf62db4a9cb9f6fe8df047ee6ee41fee8dab76 (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |