summaryrefslogtreecommitdiffstats
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
commite5dd3a864124758be3ede5144cdd2340239b30ee (patch)
treeef299b09ae12118fcb0f9c4fbb090a273b445b3c /html.c
parent0576ea2495c06ed8b674a501710158e099efcf3f (diff)
downloadmandoc-e5dd3a864124758be3ede5144cdd2340239b30ee.tar.gz
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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/html.c b/html.c
index 346380c2..fe8a3ba8 100644
--- a/html.c
+++ b/html.c
@@ -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;
}