summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-03 14:23:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-03 14:23:23 +0000
commit3331a65219031ec6e4cbbd3c21eecc102389eb25 (patch)
treeba0cc00945f7e87225ee6b0a0f5558e30181276d /main.c
parentfedafaaae16f368355e7387e9b586c527c7b0109 (diff)
downloadmandoc-3331a65219031ec6e4cbbd3c21eecc102389eb25.tar.gz
new -mdoc -Tmarkdown output mode; OK millert@ reyk@ tb@;
thanks to reyk@ and to Vsevolod at FreeBSD for suggesting it
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index 486d4c0a..47840971 100644
--- a/main.c
+++ b/main.c
@@ -67,6 +67,7 @@ enum outt {
OUTT_TREE, /* -Ttree */
OUTT_MAN, /* -Tman */
OUTT_HTML, /* -Thtml */
+ OUTT_MARKDOWN, /* -Tmarkdown */
OUTT_LINT, /* -Tlint */
OUTT_PS, /* -Tps */
OUTT_PDF /* -Tpdf */
@@ -766,6 +767,9 @@ parse(struct curparse *curp, int fd, const char *file)
case OUTT_PS:
terminal_mdoc(curp->outdata, man);
break;
+ case OUTT_MARKDOWN:
+ markdown_mdoc(curp->outdata, man);
+ break;
default:
break;
}
@@ -950,6 +954,8 @@ toptions(struct curparse *curp, char *arg)
curp->outtype = OUTT_MAN;
else if (0 == strcmp(arg, "html"))
curp->outtype = OUTT_HTML;
+ else if (0 == strcmp(arg, "markdown"))
+ curp->outtype = OUTT_MARKDOWN;
else if (0 == strcmp(arg, "utf8"))
curp->outtype = OUTT_UTF8;
else if (0 == strcmp(arg, "locale"))