diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2012-01-05 00:43:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2012-01-05 00:43:51 +0000 |
commit | 0369f0b1ba49e775bf32baa6a44a5fa951151f6c (patch) | |
tree | b7e886d4ae32b127fc7494e3bf11fb786fb86563 | |
parent | 59c6499373d4a927a750ab07798c5ec064e08535 (diff) | |
download | mandoc-0369f0b1ba49e775bf32baa6a44a5fa951151f6c.tar.gz mandoc-0369f0b1ba49e775bf32baa6a44a5fa951151f6c.tar.zst mandoc-0369f0b1ba49e775bf32baa6a44a5fa951151f6c.zip |
Fix previous such that all .It HEADs are unparsed,
not just the first one in each -diag list.
While here, drop the needless if-statement
and choose a more precise wording for the comment.
ok kristaps@
-rw-r--r-- | mdoc_macro.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 6b818754..11d14739 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.114 2012/01/02 15:48:05 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.115 2012/01/05 00:43:51 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -994,16 +994,6 @@ blk_full(MACRO_PROT_ARGS) enum margverr av; char *p; - /* - * Exception: `-diag' lists are not parsed, but lists in general - * are parsed. - */ - nparsed = 0; - if (MDOC_It == tok && NULL != m->last && - MDOC_Bl == m->last->tok && - LIST_diag == m->last->norm->Bl.type) - nparsed = 1; - nl = MDOC_NEWLINE & m->flags; /* Close out prior implicit scope. */ @@ -1048,6 +1038,14 @@ blk_full(MACRO_PROT_ARGS) head = body = NULL; /* + * Exception: Heads of `It' macros in `-diag' lists are not + * parsed, even though `It' macros in general are parsed. + */ + nparsed = MDOC_It == tok && + MDOC_Bl == m->last->parent->tok && + LIST_diag == m->last->parent->norm->Bl.type; + + /* * The `Nd' macro has all arguments in its body: it's a hybrid * of block partial-explicit and full-implicit. Stupid. */ |