=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.95 retrieving revision 1.97 diff -u -p -r1.95 -r1.97 --- mandoc/html.c 2010/01/30 08:42:20 1.95 +++ mandoc/html.c 2010/04/03 12:46:35 1.97 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.95 2010/01/30 08:42:20 kristaps Exp $ */ +/* $Id: html.c,v 1.97 2010/04/03 12:46:35 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -466,19 +466,23 @@ print_doctype(struct html *h) { const char *doctype; const char *dtd; + const char *name; switch (h->type) { case (HTML_HTML_4_01_STRICT): + name = "HTML"; doctype = "-//W3C//DTD HTML 4.01//EN"; dtd = "http://www.w3.org/TR/html4/strict.dtd"; break; default: + name = "html"; doctype = "-//W3C//DTD XHTML 1.0 Strict//EN"; dtd = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"; break; } - printf("\n", doctype, dtd); + printf("\n", + name, doctype, dtd); } @@ -503,8 +507,6 @@ print_text(struct html *h, const char *p) case(')'): /* FALLTHROUGH */ case(']'): - /* FALLTHROUGH */ - case('}'): if ( ! (HTML_IGNDELIM & h->flags)) h->flags |= HTML_NOSPACE; break; @@ -521,11 +523,11 @@ print_text(struct html *h, const char *p) if (*p && 0 == *(p + 1)) switch (*p) { + case('|'): + /* FALLTHROUGH */ case('('): /* FALLTHROUGH */ case('['): - /* FALLTHROUGH */ - case('{'): h->flags |= HTML_NOSPACE; break; default: