aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-10-05 21:35:17 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-10-05 21:35:17 +0000
commitf383f7b17706b2186a0194c0227f7b6c80542b3c (patch)
tree19bdfb3b295d620477835b8071ded71fc4295691 /html.c
parent4bc55ae9552362c7707a31de6c34b7d27ff3dbba (diff)
downloadmandoc-f383f7b17706b2186a0194c0227f7b6c80542b3c.tar.gz
mandoc-f383f7b17706b2186a0194c0227f7b6c80542b3c.tar.zst
mandoc-f383f7b17706b2186a0194c0227f7b6c80542b3c.zip
Add the -Ofragment option to -T[]x]html. This accomodates for embedding
manual output in existing HTML or XHTML documents, e.g., when invoking mandoc from an SSI or CGI.
Diffstat (limited to 'html.c')
-rw-r--r--html.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/html.c b/html.c
index 6ee11b5e..326df035 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.149 2011/07/07 14:34:11 kristaps Exp $ */
+/* $Id: html.c,v 1.150 2011/10/05 21:35:17 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -118,13 +118,14 @@ static void *
ml_alloc(char *outopts, enum htmltype type)
{
struct html *h;
- const char *toks[4];
+ const char *toks[5];
char *v;
toks[0] = "style";
toks[1] = "man";
toks[2] = "includes";
- toks[3] = NULL;
+ toks[3] = "fragment";
+ toks[4] = NULL;
h = mandoc_calloc(1, sizeof(struct html));
@@ -143,6 +144,9 @@ ml_alloc(char *outopts, enum htmltype type)
case (2):
h->base_includes = v;
break;
+ case (3):
+ h->oflags |= HTML_FRAGMENT;
+ break;
default:
break;
}