* mdocml: fix spacing after empty .Fl
@ 2017-03-07 13:28 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-03-07 13:28 UTC (permalink / raw)
To: source
Log Message:
-----------
fix spacing after empty .Fl
Modified Files:
--------------
mdocml:
mdoc_markdown.c
mdocml/regress/mdoc/Fl:
Makefile
noarg.out_markdown
Revision Data
-------------
Index: mdoc_markdown.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/mdoc_markdown.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lmdoc_markdown.c -Lmdoc_markdown.c -u -p -r1.5 -r1.6
--- mdoc_markdown.c
+++ 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_
{ 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 */
@@ -1016,6 +1017,15 @@ md_post_Fd(struct roff_node *n)
{
md_post_raw(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
Index: noarg.out_markdown
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Fl/noarg.out_markdown,v
retrieving revision 1.1
retrieving revision 1.2
diff -Lregress/mdoc/Fl/noarg.out_markdown -Lregress/mdoc/Fl/noarg.out_markdown -u -p -r1.1 -r1.2
--- regress/mdoc/Fl/noarg.out_markdown
+++ regress/mdoc/Fl/noarg.out_markdown
@@ -16,7 +16,7 @@ trailing punctuation
**-**.
Following macros
-**-** \[flag]
+**-**\[flag]
follow without white space.
OpenBSD - August 21, 2014
Index: Makefile
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/mdoc/Fl/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/mdoc/Fl/Makefile -Lregress/mdoc/Fl/Makefile -u -p -r1.2 -r1.3
--- regress/mdoc/Fl/Makefile
+++ 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>
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-07 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-07 13:28 mdocml: fix spacing after empty .Fl schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).