]> git.cameronkatri.com Git - mandoc.git/blobdiff - html.c
mark up .Ar, .Fa, .Va, .Ft, and .Vt with <var> rather than <i>;
[mandoc.git] / html.c
diff --git a/html.c b/html.c
index c3ab3b47c579d55366933ccb11293edcba3d7118..40f2cc076bf97fbb2c372cbb059f7baf001759dd 100644 (file)
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/*     $Id: html.c,v 1.203 2017/01/28 22:36:38 schwarze Exp $ */
+/*     $Id: html.c,v 1.207 2017/02/05 20:22:04 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -65,7 +65,7 @@ static        const struct htmldata htmltags[TAG_MAX] = {
        {"br",          HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL},
        {"a",           0},
        {"table",       HTML_NLALL | HTML_INDENT},
-       {"tbody",       HTML_NLALL | HTML_INDENT},
+       {"colgroup",    HTML_NLALL | HTML_INDENT},
        {"col",         HTML_NOSTACK | HTML_AUTOCLOSE | HTML_NLALL},
        {"tr",          HTML_NLALL | HTML_INDENT},
        {"td",          HTML_NLAROUND},
@@ -76,6 +76,8 @@ static        const struct htmldata htmltags[TAG_MAX] = {
        {"dt",          HTML_NLAROUND},
        {"dd",          HTML_NLAROUND | HTML_INDENT},
        {"pre",         HTML_NLALL | HTML_NOINDENT},
+       {"var",         0},
+       {"cite",        0},
        {"b",           0},
        {"i",           0},
        {"code",        0},
@@ -132,7 +134,7 @@ html_alloc(const struct manoutput *outopts)
 
        h = mandoc_calloc(1, sizeof(struct html));
 
-       h->tags.head = NULL;
+       h->tag = NULL;
        h->style = outopts->style;
        h->base_man = outopts->man;
        h->base_includes = outopts->includes;
@@ -150,8 +152,8 @@ html_free(void *p)
 
        h = (struct html *)p;
 
-       while ((tag = h->tags.head) != NULL) {
-               h->tags.head = tag->next;
+       while ((tag = h->tag) != NULL) {
+               h->tag = tag->next;
                free(tag);
        }
 
@@ -455,13 +457,13 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
 
        tflags = htmltags[tag].flags;
 
-       /* Push this tags onto the stack of open scopes. */
+       /* Push this tag onto the stack of open scopes. */
 
        if ((tflags & HTML_NOSTACK) == 0) {
                t = mandoc_malloc(sizeof(struct tag));
                t->tag = tag;
-               t->next = h->tags.head;
-               h->tags.head = t;
+               t->next = h->tag;
+               h->tag = t;
        } else
                t = NULL;
 
@@ -699,7 +701,7 @@ print_ctag(struct html *h, struct tag *tag)
        if (tflags & HTML_NLAFTER)
                print_endline(h);
 
-       h->tags.head = tag->next;
+       h->tag = tag->next;
        free(tag);
 }
 
@@ -760,7 +762,7 @@ print_tagq(struct html *h, const struct tag *until)
 {
        struct tag      *tag;
 
-       while ((tag = h->tags.head) != NULL) {
+       while ((tag = h->tag) != NULL) {
                print_ctag(h, tag);
                if (until && tag == until)
                        return;
@@ -772,7 +774,7 @@ print_stagq(struct html *h, const struct tag *suntil)
 {
        struct tag      *tag;
 
-       while ((tag = h->tags.head) != NULL) {
+       while ((tag = h->tag) != NULL) {
                if (suntil && tag == suntil)
                        return;
                print_ctag(h, tag);