summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 13:17:58 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 13:17:58 +0000
commit47413dce678dda2ae975720bf472a4a00ecde62a (patch)
tree942ea6e02b6e8833cd85829bf173d661f83b7865 /mdoc_macro.c
parentc5b2462b76dc92a73a1f5ae0226aea1b37d83f0e (diff)
downloadmandoc-47413dce678dda2ae975720bf472a4a00ecde62a.tar.gz
`Fl' has each argument be in a separate scope (thanks Ingo Schwarze).
Situation of `Fl [arg]* "" [arg]*' is fixed: empty arguments are ignored. Note that OpenBSD crashes when this happens. Situation of `Fl' is fixed wrt trailing whitespace.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 9ee6a0bd..ca4e554f 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -808,6 +808,17 @@ in_line(MACRO_PROT_ARGS)
cnt++;
if ( ! mdoc_word_alloc(m, line, la, p))
return(0);
+
+ /*
+ * `Fl' macros have their scope re-opened with each new
+ * word so that the `-' can be added to each one without
+ * having to parse out spaces.
+ */
+ if (0 == lastpunct && MDOC_Fl == tok) {
+ if ( ! rew_elem(m, tok))
+ return(0);
+ lastpunct = 1;
+ }
}
if (0 == lastpunct && ! rew_elem(m, tok))