diff options
-rw-r--r-- | mdoc_markdown.c | 12 | ||||
-rw-r--r-- | regress/mdoc/Fl/Makefile | 2 | ||||
-rw-r--r-- | regress/mdoc/Fl/noarg.out_markdown | 2 |
3 files changed, 13 insertions, 3 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) { diff --git a/regress/mdoc/Fl/Makefile b/regress/mdoc/Fl/Makefile index b024856e..df24f7c0 100644 --- a/regress/mdoc/Fl/Makefile +++ b/regress/mdoc/Fl/Makefile @@ -1,6 +1,6 @@ # $OpenBSD: Makefile,v 1.8 2014/08/21 12:56:24 schwarze Exp $ REGRESS_TARGETS = noarg multiarg parsed punct font -MARKDOWN_TARGETS = noarg multiarg punct font +MARKDOWN_TARGETS = noarg multiarg parsed punct font .include <bsd.regress.mk> diff --git a/regress/mdoc/Fl/noarg.out_markdown b/regress/mdoc/Fl/noarg.out_markdown index 9edc191d..7c023597 100644 --- a/regress/mdoc/Fl/noarg.out_markdown +++ b/regress/mdoc/Fl/noarg.out_markdown @@ -16,7 +16,7 @@ trailing punctuation **-**. Following macros -**-** \[flag] +**-**\[flag] follow without white space. OpenBSD - August 21, 2014 |