summaryrefslogtreecommitdiffstats
path: root/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2018-12-31 07:08:12 +0000
committerIngo Schwarze <schwarze@openbsd.org>2018-12-31 07:08:12 +0000
commitc307b01e3d5709e7d34106b6fe8e98b468bf33f8 (patch)
tree939b2a1acb043c38c2dacc70855f028e163b6f42 /man_term.c
parentc0cea6817b9d23d8e5e4a752fc1dff8dfb604cdc (diff)
downloadmandoc-c307b01e3d5709e7d34106b6fe8e98b468bf33f8.tar.gz
Move parsing of the .nf and .fi (fill mode) requests from the man(7)
parser to the roff(7) parser. As a side effect, .nf and .fi are now also parsed in mdoc(7) input, though the mdoc(7) formatters still ignore most of their effect.
Diffstat (limited to 'man_term.c')
-rw-r--r--man_term.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/man_term.c b/man_term.c
index df8eb63e..f7e6c896 100644
--- a/man_term.c
+++ b/man_term.c
@@ -117,8 +117,6 @@ static const struct man_term_act man_term_acts[MAN_MAX - MAN_TH] = {
{ pre_I, NULL, 0 }, /* I */
{ pre_alternate, NULL, 0 }, /* IR */
{ pre_alternate, NULL, 0 }, /* RI */
- { pre_literal, NULL, MAN_NOTEXT }, /* nf */
- { pre_literal, NULL, MAN_NOTEXT }, /* fi */
{ NULL, NULL, 0 }, /* RE */
{ pre_RS, post_RS, 0 }, /* RS */
{ pre_DT, NULL, 0 }, /* DT */
@@ -247,7 +245,7 @@ pre_literal(DECL_ARGS)
term_newln(p);
- if (n->tok == MAN_nf || n->tok == MAN_EX)
+ if (n->tok == MAN_EX)
mt->fl |= MANT_LITERAL;
else
mt->fl &= ~MANT_LITERAL;
@@ -984,6 +982,11 @@ print_man_node(DECL_ARGS)
break;
}
+ if (n->tok == ROFF_nf)
+ n->tok = MAN_EX;
+ else if (n->tok == ROFF_fi)
+ n->tok = MAN_EE;
+
if (n->tok < ROFF_MAX) {
roff_term_pre(p, n);
return;