diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-10-05 21:35:17 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-10-05 21:35:17 +0000 |
commit | e5dd3a864124758be3ede5144cdd2340239b30ee (patch) | |
tree | ef299b09ae12118fcb0f9c4fbb090a273b445b3c /html.c | |
parent | 0576ea2495c06ed8b674a501710158e099efcf3f (diff) | |
download | mandoc-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; } |