diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-03 14:23:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-03-03 14:23:23 +0000 |
commit | 3331a65219031ec6e4cbbd3c21eecc102389eb25 (patch) | |
tree | ba0cc00945f7e87225ee6b0a0f5558e30181276d /main.c | |
parent | fedafaaae16f368355e7387e9b586c527c7b0109 (diff) | |
download | mandoc-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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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")) |