aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-01-05 18:59:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-01-05 18:59:46 +0000
commit0ff0ed9ccba23c2bb72acd03d35240498c7dff6e (patch)
treeb8995e888aee4017f15d5fa009e67768284b0efb
parent39411659cecc9e05af6cfa55bd6f04cf3e858e79 (diff)
downloadmandoc-0ff0ed9ccba23c2bb72acd03d35240498c7dff6e.tar.gz
mandoc-0ff0ed9ccba23c2bb72acd03d35240498c7dff6e.tar.zst
mandoc-0ff0ed9ccba23c2bb72acd03d35240498c7dff6e.zip
In HTML output, man(7) .RS blocks get formatted as <div class="Bd-indent">,
and i can see no reasonable alternative: they do indeed represent indented displays. They certainly require flow context and make no sense in phrasing context. Consequently, they have to suspend no-fill mode during their head, in just the same way as other paragraph-type macros do it. This fixes HTML syntax errors that resulted from .nf followed by .RS.
-rw-r--r--man_macro.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/man_macro.c b/man_macro.c
index eec4896c..d195576d 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.143 2019/01/05 00:36:50 schwarze Exp $ */
+/* $Id: man_macro.c,v 1.144 2019/01/05 18:59:46 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2012-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -297,8 +297,10 @@ blk_exp(MACRO_PROT_ARGS)
char *p;
int la;
- if (tok == MAN_RS)
+ if (tok == MAN_RS) {
rew_scope(man, tok);
+ man->flags |= ROFF_NONOFILL;
+ }
roff_block_alloc(man, line, ppos, tok);
head = roff_head_alloc(man, line, ppos, tok);
@@ -322,6 +324,7 @@ blk_exp(MACRO_PROT_ARGS)
man_unscope(man, head);
roff_body_alloc(man, line, ppos, tok);
+ man->flags &= ~ROFF_NONOFILL;
}
/*