=================================================================== RCS file: /cvs/mandoc/html.c,v retrieving revision 1.244 retrieving revision 1.246 diff -u -p -r1.244 -r1.246 --- mandoc/html.c 2018/11/26 01:38:23 1.244 +++ mandoc/html.c 2018/12/15 19:30:26 1.246 @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.244 2018/11/26 01:38:23 schwarze Exp $ */ +/* $Id: html.c,v 1.246 2018/12/15 19:30:26 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2011-2015, 2017, 2018 Ingo Schwarze @@ -357,7 +357,6 @@ static int print_encode(struct html *h, const char *p, const char *pend, int norecurse) { char numbuf[16]; - struct tag *t; const char *seq; size_t sz; int c, len, breakline, nospace; @@ -383,9 +382,7 @@ print_encode(struct html *h, const char *p, const char if (breakline && (p >= pend || *p == ' ' || *p == ASCII_NBRSP)) { - t = print_otag(h, TAG_DIV, ""); - print_text(h, "\\~"); - print_tagq(h, t); + print_otag(h, TAG_BR, ""); breakline = 0; while (p < pend && (*p == ' ' || *p == ASCII_NBRSP)) p++; @@ -405,9 +402,6 @@ print_encode(struct html *h, const char *p, const char continue; esc = mandoc_escape(&p, &seq, &len); - if (ESCAPE_ERROR == esc) - break; - switch (esc) { case ESCAPE_FONT: case ESCAPE_FONTPREV: @@ -425,6 +419,8 @@ print_encode(struct html *h, const char *p, const char case ESCAPE_SKIPCHAR: h->flags |= HTML_SKIPCHAR; continue; + case ESCAPE_ERROR: + continue; default: break; } @@ -448,6 +444,9 @@ print_encode(struct html *h, const char *p, const char c = mchars_spec2cp(seq, len); if (c <= 0) continue; + break; + case ESCAPE_UNDEF: + c = *seq; break; case ESCAPE_DEVICE: print_word(h, "html");