From f383f7b17706b2186a0194c0227f7b6c80542b3c Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Wed, 5 Oct 2011 21:35:17 +0000 Subject: 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. --- html.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'html.c') 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 * Copyright (c) 2011 Ingo Schwarze @@ -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; } -- cgit v1.2.3-56-ge451