=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.148 retrieving revision 1.150 diff -u -p -r1.148 -r1.150 --- mandoc/html.c 2011/07/04 09:42:38 1.148 +++ mandoc/html.c 2011/10/05 21:35:17 1.150 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.148 2011/07/04 09:42:38 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; } @@ -513,9 +517,11 @@ print_text(struct html *h, const char *word) print_otag(h, TAG_I, 0, NULL); assert(word); - if ( ! print_encode(h, word, 0)) + if ( ! print_encode(h, word, 0)) { if ( ! (h->flags & HTML_NONOSPACE)) h->flags &= ~HTML_NOSPACE; + } else + h->flags |= HTML_NOSPACE; if (h->metaf) { print_tagq(h, h->metaf);