]> git.cameronkatri.com Git - mandoc.git/commitdiff
Fix .In formatting in the SYNOPSIS:
authorIngo Schwarze <schwarze@openbsd.org>
Tue, 7 Mar 2017 12:39:01 +0000 (12:39 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Tue, 7 Mar 2017 12:39:01 +0000 (12:39 +0000)
No &zwnj; in the middle of **, please.

mdoc_markdown.c
regress/mdoc/Fd/Makefile
regress/mdoc/Fd/empty.out_markdown [new file with mode: 0644]
regress/mdoc/In/Makefile
regress/mdoc/In/break.out_markdown [new file with mode: 0644]
regress/mdoc/In/noarg.out_markdown [new file with mode: 0644]

index e43eb568f806f9dd39dada03e41739469c25b0ae..4523a4a462f7cc79ca34170ea1b923f2113ea07b 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_markdown.c,v 1.3 2017/03/06 14:58:10 schwarze Exp $ */
+/*     $Id: mdoc_markdown.c,v 1.4 2017/03/07 12:39:01 schwarze Exp $ */
 /*
  * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
  *
@@ -129,7 +129,7 @@ static      const struct md_act md_acts[MDOC_MAX + 1] = {
        { 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 */
-       { NULL, md_pre_In, md_post_In, "*", "*" }, /* In */
+       { NULL, md_pre_In, md_post_In, NULL, NULL }, /* In */
        { NULL, md_pre_raw, md_post_raw, "`", "`" }, /* Li */
        { md_cond_head, md_pre_Nd, NULL, NULL, NULL }, /* Nd */
        { NULL, md_pre_Nm, md_post_Nm, "**", "**" }, /* Nm */
@@ -1067,16 +1067,15 @@ md_pre_In(struct roff_node *n)
 {
        if (n->flags & NODE_SYNPRETTY) {
                md_pre_syn(n);
-               md_pre_raw(n);
-               md_rawword("*");
+               md_rawword("**");
                outflags &= ~MD_spc;
                md_word("#include <");
-               outflags &= ~MD_spc;
        } else {
                md_word("<");
                outflags &= ~MD_spc;
-               md_pre_raw(n);
+               md_rawword("*");
        }
+       outflags &= ~MD_spc;
        return 1;
 }
 
@@ -1085,13 +1084,11 @@ md_post_In(struct roff_node *n)
 {
        if (n->flags & NODE_SYNPRETTY) {
                outflags &= ~MD_spc;
-               md_rawword(">*");
-               md_post_raw(n);
+               md_rawword(">**");
                outflags |= MD_nl;
        } else {
-               md_post_raw(n);
                outflags &= ~MD_spc;
-               md_rawword(">");
+               md_rawword("*>");
        }
 }
 
index c1c6d5ddb2cdad55ff4f3188e31eb39b482650d8..9c1206096d5f25d7924050a6793073a9292a0bc6 100644 (file)
@@ -3,6 +3,6 @@
 REGRESS_TARGETS         = break empty eos font
 LINT_TARGETS    = empty
 SKIP_TMAN       = eos
-MARKDOWN_TARGETS = break eos font
+MARKDOWN_TARGETS = break empty eos font
 
 .include <bsd.regress.mk>
diff --git a/regress/mdoc/Fd/empty.out_markdown b/regress/mdoc/Fd/empty.out_markdown
new file mode 100644 (file)
index 0000000..9dc7103
--- /dev/null
@@ -0,0 +1,17 @@
+FD-EMPTY(1) - General Commands Manual
+
+# NAME
+
+**Fd-empty** - empty preprocessor directive macros
+
+# SYNOPSIS
+
+**#include &lt;sys/types.h>**  
+**#include &lt;stdlib.h>**
+
+# DESCRIPTION
+
+leading text
+trailing text
+
+OpenBSD - February 5, 2015
index 1c8a484f78fcc360680b0e8cc5abc13fe8f7bf62..9c92ccf40377172477bc0f50ecc033d4232696ea 100644 (file)
@@ -2,6 +2,6 @@
 
 REGRESS_TARGETS         = break eos font noarg
 LINT_TARGETS    = noarg
-MARKDOWN_TARGETS = eos font
+MARKDOWN_TARGETS = break eos font noarg
 
 .include <bsd.regress.mk>
diff --git a/regress/mdoc/In/break.out_markdown b/regress/mdoc/In/break.out_markdown
new file mode 100644 (file)
index 0000000..dbc1085
--- /dev/null
@@ -0,0 +1,35 @@
+IN-BREAK(2) - System Calls Manual
+
+# NAME
+
+**In-break** - line break before header include file
+
+# SYNOPSIS
+
+**#include &lt;fcntl.h>**
+
+*int*  
+**open**(*const char \*path*, *int flags*, *mode\_t mode*);
+
+**#include &lt;sys/types.h>**  
+**#include &lt;unistd.h>**
+
+*int*  
+**dup**(*int oldd*);
+
+*ssize\_t*  
+**write**(*int d*, *const void \*buf*, *size\_t nbytes*);
+
+# DESCRIPTION
+
+&lt;*fcntl.h*>
+*int*
+**open**(*const char \*path*, *int flags*, *mode\_t mode*)
+&lt;*sys/types.h*>
+&lt;*unistd.h*>
+*int*
+**dup**(*int oldd*)
+*ssize\_t*
+**write**(*int d*, *const void \*buf*, *size\_t nbytes*)
+
+OpenBSD - June 6, 2010
diff --git a/regress/mdoc/In/noarg.out_markdown b/regress/mdoc/In/noarg.out_markdown
new file mode 100644 (file)
index 0000000..8197022
--- /dev/null
@@ -0,0 +1,25 @@
+IN-NOARG(2) - System Calls Manual
+
+# NAME
+
+**In-noarg** - include file macros without argument
+
+# SYNOPSIS
+
+**#include &lt;math.h>**
+
+*double*  
+**sin**(*double x*);
+
+*double*  
+**cos**(*double x*);
+
+# DESCRIPTION
+
+&lt;*math.h*>
+*double*
+**sin**(*double x*)
+*double*
+**cos**(*double x*)
+
+OpenBSD - February 5, 2015