diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2021-08-14 13:53:08 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2021-08-14 13:53:08 +0000 |
commit | 510f116a58364ccf5c3399f053bfacc9d675025c (patch) | |
tree | 0d9aefc6d4265e2b1a4fef09c3242998a0a002fc | |
parent | eaf84848c463416967ecacc10a55630fcf7f115c (diff) | |
download | mandoc-510f116a58364ccf5c3399f053bfacc9d675025c.tar.gz |
print a BAGARG message if -T markdown is requested on man(7) input;
suggested by Michael Stapelberg at debian dot org
-rw-r--r-- | main.c | 3 | ||||
-rw-r--r-- | mandoc.1 | 8 | ||||
-rw-r--r-- | mandoc.h | 1 | ||||
-rw-r--r-- | mandoc_msg.c | 1 |
4 files changed, 13 insertions, 0 deletions
@@ -968,6 +968,9 @@ parse(struct mparse *mp, int fd, const char *file, case OUTT_PS: terminal_man(outst->outdata, meta); break; + case OUTT_MARKDOWN: + mandoc_msg(MANDOCERR_MAN_TMARKDOWN, 0, 0, NULL); + break; default: break; } @@ -2371,6 +2371,14 @@ The .Fl O Cm tag option was specified but the tag was not found in any of the displayed manual pages. +.It Sy "\-Tmarkdown unsupported for man(7) input" +.Pq man +The +.Fl T Cm markdown +option was specified but an input file uses the +.Xr man 7 +language. +No output is produced for that input file. .El .Sh SEE ALSO .Xr apropos 1 , @@ -257,6 +257,7 @@ enum mandocerr { MANDOCERR_BADVAL_BAD, /* bad argument value */ MANDOCERR_BADVAL_DUPE, /* duplicate argument value */ MANDOCERR_TAG, /* no such tag */ + MANDOCERR_MAN_TMARKDOWN, /* -Tmarkdown unsupported for man(7) input */ MANDOCERR_SYSERR, /* ===== start of system errors ===== */ diff --git a/mandoc_msg.c b/mandoc_msg.c index 8867bb4b..beec5059 100644 --- a/mandoc_msg.c +++ b/mandoc_msg.c @@ -257,6 +257,7 @@ static const char *const type_message[MANDOCERR_MAX] = { "bad option value", "duplicate option value", "no such tag", + "-Tmarkdown unsupported for man(7) input", /* system errors */ NULL, |