diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-07 13:28:02 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-07 13:28:02 +0000 |
commit | 2e1d9e80f2952398060e47e91fece447ebd4ac5c (patch) | |
tree | 09af28200b9c0736b8566bc68b40456e637a7a59 /mdoc_markdown.c | |
parent | 54c20ea66e3a8b5f2d1f39bef82737cd2afce2a4 (diff) | |
download | mandoc-2e1d9e80f2952398060e47e91fece447ebd4ac5c.tar.gz |
fix spacing after empty .Fl
Diffstat (limited to 'mdoc_markdown.c')
-rw-r--r-- | mdoc_markdown.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mdoc_markdown.c b/mdoc_markdown.c index 56559702..f14d66ce 100644 --- a/mdoc_markdown.c +++ b/mdoc_markdown.c @@ -90,6 +90,7 @@ static void md_post_En(struct roff_node *); static void md_post_Eo(struct roff_node *); static void md_post_Fa(struct roff_node *); static void md_post_Fd(struct roff_node *); +static void md_post_Fl(struct roff_node *); static void md_post_Fn(struct roff_node *); static void md_post_Fo(struct roff_node *); static void md_post_In(struct roff_node *); @@ -126,7 +127,7 @@ static const struct md_act md_acts[MDOC_MAX + 1] = { { NULL, NULL, NULL, NULL, NULL }, /* Ex */ { NULL, md_pre_Fa, md_post_Fa, NULL, NULL }, /* Fa */ { NULL, md_pre_Fd, md_post_Fd, "**", "**" }, /* Fd */ - { NULL, md_pre_raw, md_post_raw, "**-", "**" }, /* Fl */ + { NULL, md_pre_raw, md_post_Fl, "**-", "**" }, /* Fl */ { NULL, md_pre_Fn, md_post_Fn, NULL, NULL }, /* Fn */ { NULL, md_pre_Fd, md_post_raw, "*", "*" }, /* Ft */ { NULL, md_pre_raw, md_post_raw, "**", "**" }, /* Ic */ @@ -1018,6 +1019,15 @@ md_post_Fd(struct roff_node *n) outflags |= MD_br; } +static void +md_post_Fl(struct roff_node *n) +{ + md_post_raw(n); + if (n->child == NULL && n->next != NULL && + n->next->type != ROFFT_TEXT && !(n->next->flags & NODE_LINE)) + outflags &= ~MD_spc; +} + static int md_pre_Fn(struct roff_node *n) { |