9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] mothra: fix rendering of <samp> tag
@ 2022-01-22 17:30 Kristo
  2022-01-26 17:51 ` ori
  0 siblings, 1 reply; 4+ messages in thread
From: Kristo @ 2022-01-22 17:30 UTC (permalink / raw)
  To: 9front

Hi all,

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 fix this issue.

diff 9d43029ff984435111eff658308a44b4f3eee1cc uncommitted
--- a/sys/src/cmd/mothra/rdhtml.c
+++ b/sys/src/cmd/mothra/rdhtml.c
@@ -982,6 +982,7 @@
 			g.state->size=NORMAL;
 			break;
 		case Tag_code:
+		case Tag_samp:
 			g.state->font=CWIDTH;
 			g.state->size=NORMAL;
 			break;
@@ -1113,7 +1114,6 @@
 		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 @@
 		case Tag_listing:
 		case Tag_menu:
 		case Tag_ol:
-		case Tag_samp:
 		case Tag_title:
 		case Tag_ul:
 		case Tag_xmp:

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-01-28  4:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22 17:30 [9front] mothra: fix rendering of <samp> tag Kristo
2022-01-26 17:51 ` ori
2022-01-26 18:32   ` Kristo
2022-01-27 16:34     ` ori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).