aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/term_tag.h
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2021-03-30 17:16:55 +0000
committerIngo Schwarze <schwarze@openbsd.org>2021-03-30 17:16:55 +0000
commit6e220064abb2f2f7e5756999097a6db9c2064787 (patch)
treee10e613171ee6a84423ddbe80fd01bef27730806 /term_tag.h
parent097ebd78c83b64e46747401071cc01d772a3d1cd (diff)
downloadmandoc-6e220064abb2f2f7e5756999097a6db9c2064787.tar.gz
mandoc-6e220064abb2f2f7e5756999097a6db9c2064787.tar.zst
mandoc-6e220064abb2f2f7e5756999097a6db9c2064787.zip
Append .html suffix to temporary files enabling browsers to recognise it.
Occasionally one might read a manual page in a webbrowser, e.g. "MANPAGER=firefox man -T html jq", however temporary files created for pagers lack file extensions and most web browsers are unable to detect a file's content without it. Special case mandoc(1)'s HTML output format by appending the ".html" suffix to file names such that browsers will actually render HTML as such instead of showing it as plain text. Idea and patch from kn@, with minor help from me.
Diffstat (limited to 'term_tag.h')
-rw-r--r--term_tag.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/term_tag.h b/term_tag.h
index f290cf51..f82b1a6e 100644
--- a/term_tag.h
+++ b/term_tag.h
@@ -1,4 +1,4 @@
-/* $Id: term_tag.h,v 1.3 2020/07/21 15:10:01 schwarze Exp $ */
+/* $Id: term_tag.h,v 1.4 2021/03/30 17:16:55 schwarze Exp $ */
/*
* Copyright (c) 2015, 2018, 2019, 2020 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -28,7 +28,7 @@ struct tag_files {
};
-struct tag_files *term_tag_init(const char *, const char *);
+struct tag_files *term_tag_init(const char *, const char *, const char *);
void term_tag_write(struct roff_node *, size_t);
int term_tag_close(void);
void term_tag_unlink(void);