diff options
Diffstat (limited to 'roff_html.c')
-rw-r--r-- | roff_html.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/roff_html.c b/roff_html.c index 809e9ff8..eca5abd9 100644 --- a/roff_html.c +++ b/roff_html.c @@ -1,7 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv> - * Copyright (c) 2014, 2017, 2018 Ingo Schwarze <schwarze@openbsd.org> + * Copyright (c) 2014, 2017, 2018, 2019 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -32,17 +32,19 @@ typedef void (*roff_html_pre_fp)(ROFF_HTML_ARGS); static void roff_html_pre_br(ROFF_HTML_ARGS); static void roff_html_pre_ce(ROFF_HTML_ARGS); +static void roff_html_pre_fi(ROFF_HTML_ARGS); static void roff_html_pre_ft(ROFF_HTML_ARGS); +static void roff_html_pre_nf(ROFF_HTML_ARGS); static void roff_html_pre_sp(ROFF_HTML_ARGS); static const roff_html_pre_fp roff_html_pre_acts[ROFF_MAX] = { roff_html_pre_br, /* br */ roff_html_pre_ce, /* ce */ - roff_html_pre_br, /* fi */ + roff_html_pre_fi, /* fi */ roff_html_pre_ft, /* ft */ NULL, /* ll */ NULL, /* mc */ - roff_html_pre_br, /* nf */ + roff_html_pre_nf, /* nf */ NULL, /* po */ roff_html_pre_ce, /* rj */ roff_html_pre_sp, /* sp */ @@ -80,6 +82,13 @@ roff_html_pre_ce(ROFF_HTML_ARGS) } static void +roff_html_pre_fi(ROFF_HTML_ARGS) +{ + if (html_fillmode(h, TOKEN_NONE) == ROFF_fi) + print_otag(h, TAG_BR, ""); +} + +static void roff_html_pre_ft(ROFF_HTML_ARGS) { const char *cp; @@ -89,6 +98,13 @@ roff_html_pre_ft(ROFF_HTML_ARGS) } static void +roff_html_pre_nf(ROFF_HTML_ARGS) +{ + if (html_fillmode(h, TOKEN_NONE) == ROFF_nf) + print_otag(h, TAG_BR, ""); +} + +static void roff_html_pre_sp(ROFF_HTML_ARGS) { print_paragraph(h); |