mothra: fix rendering of <samp> tag

Mothra does not currently render text inside <samp> tags inline
similar to <code>, but instead treats them like <pre> which is actually
incorrect behavior. The following small patch should fixes issue.
This commit is contained in:
Kristo 2022-01-22 18:00:22 +00:00 committed by Ori Bernstein
parent 33231f9222
commit 8dc8e3a019

View file

@ -982,6 +982,7 @@ void plrdhtml(char *name, int fd, Www *dst, int killimgs){
g.state->size=NORMAL;
break;
case Tag_code:
case Tag_samp:
g.state->font=CWIDTH;
g.state->size=NORMAL;
break;
@ -1113,7 +1114,6 @@ void plrdhtml(char *name, int fd, Www *dst, int killimgs){
case Tag_xmp:
htmlerror(g.name, g.lineno, "<%s> deprecated", tag[g.tag].name);
case Tag_pre:
case Tag_samp:
g.state->indent=0;
g.state->pre=1;
g.state->font=CWIDTH;
@ -1203,7 +1203,6 @@ void plrdhtml(char *name, int fd, Www *dst, int killimgs){
case Tag_listing:
case Tag_menu:
case Tag_ol:
case Tag_samp:
case Tag_title:
case Tag_ul:
case Tag_xmp: