diff options
-rw-r--r-- | mdoc.7 | 22 | ||||
-rw-r--r-- | mdoc_html.c | 20 | ||||
-rw-r--r-- | mdoc_term.c | 10 |
3 files changed, 26 insertions, 26 deletions
@@ -1596,6 +1596,22 @@ is provided. .Ss \&Fc .Ss \&Fd .Ss \&Fl +Command-line flag. Used when listing arguments to command-line +utilities. Prints a fixed-width hyphen +.Sq \- +before each delimited argument. If no arguments are provided, a hyphen +is still printed. +.Pp +Examples: +.Bd -literal -offset indent +\&.Fl a b c +\&.Fl +\&.Op Fl o Ns Ar file +.Ed +.Pp +See also +.Sx \&Cm . +. .Ss \&Fn .Ss \&Fo .Ss \&Fr @@ -1830,6 +1846,12 @@ file re-write .Pp .Bl -dash -compact .It +Historic +.Xr groff 1 +does not print a dash for empty +.Sx \&Fl +arguments. This behaviour has been discontinued. +.It .Xr groff 1 behaves strangely (even between versions) when specifying .Sq \ef diff --git a/mdoc_html.c b/mdoc_html.c index 719d9df5..e43d9809 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -659,25 +659,13 @@ mdoc_fl_pre(MDOC_ARGS) { struct htmlpair tag; + PAIR_CLASS_INIT(&tag, "flag"); + print_otag(h, TAG_SPAN, 1, &tag); + /* `Cm' has no leading hyphen. */ - if (MDOC_Cm == n->tok) { - PAIR_CLASS_INIT(&tag, "flag"); - print_otag(h, TAG_SPAN, 1, &tag); + if (MDOC_Cm == n->tok) return(1); - } - - /* A zero-length child shouldn't get a dash. */ - - if (n->child) { - assert(MDOC_TEXT == n->child->type); - assert(n->child->string); - if ('\0' == *n->child->string) - return(0); - } - - PAIR_CLASS_INIT(&tag, "flag"); - print_otag(h, TAG_SPAN, 1, &tag); print_text(h, "\\-"); diff --git a/mdoc_term.c b/mdoc_term.c index 82d32adc..6127a0d9 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1019,16 +1019,6 @@ termp_fl_pre(DECL_ARGS) { term_fontpush(p, TERMFONT_BOLD); - - /* A zero-length child shouldn't get a dash. */ - - if (n->child) { - assert(MDOC_TEXT == n->child->type); - assert(n->child->string); - if ('\0' == *n->child->string) - return(0); - } - term_word(p, "\\-"); /* A blank `Fl' should incur a subsequent space. */ |