From 819bd5dd19d9092c954577c8f97cf66eda73ed2e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 9 Nov 2019 14:39:49 +0000 Subject: In the past, generating comment nodes stopped at the .TH or .Dd macro, which is usually close to the beginning of the file, right after the Copyright header comments. But espie@ found horrible input files in the textproc/fstrcmp port that generate lots of parse nodes before even getting to the header macro. In some formatters, comment nodes after some kinds of real content triggered assertions. So make sure generation of comment nodes stops once real content is encountered. --- mandoc_parse.h | 1 + 1 file changed, 1 insertion(+) (limited to 'mandoc_parse.h') diff --git a/mandoc_parse.h b/mandoc_parse.h index ce55ce16..3f73a223 100644 --- a/mandoc_parse.h +++ b/mandoc_parse.h @@ -29,6 +29,7 @@ #define MPARSE_UTF8 (1 << 4) /* accept UTF-8 input */ #define MPARSE_LATIN1 (1 << 5) /* accept ISO-LATIN-1 input */ #define MPARSE_VALIDATE (1 << 6) /* call validation functions */ +#define MPARSE_COMMENT (1 << 7) /* save comments in the tree */ struct roff_meta; -- cgit