* [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
* Re: [9front] mothra: fix rendering of <samp> tag
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
0 siblings, 1 reply; 4+ messages in thread
From: ori @ 2022-01-26 17:51 UTC (permalink / raw)
To: 9front
Do you have an example site or html snippet that
I can compare against?
Quoth Kristo <kristo.ilmari@gmail.com>:
> 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
* Re: [9front] mothra: fix rendering of <samp> tag
2022-01-26 17:51 ` ori
@ 2022-01-26 18:32 ` Kristo
2022-01-27 16:34 ` ori
0 siblings, 1 reply; 4+ messages in thread
From: Kristo @ 2022-01-26 18:32 UTC (permalink / raw)
To: 9front
Hi,
> Do you have an example site or html snippet that
> I can compare against?
It's actually a rather unused tag, but here's this small
html file from mozillas documentation:
https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/HTML/Element/samp/_sample_.Basic_example.html
My apologies, I should've included this in the first email.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9front] mothra: fix rendering of <samp> tag
2022-01-26 18:32 ` Kristo
@ 2022-01-27 16:34 ` ori
0 siblings, 0 replies; 4+ messages in thread
From: ori @ 2022-01-27 16:34 UTC (permalink / raw)
To: 9front
Quoth Kristo <kristo.ilmari@gmail.com>:
> Hi,
>
> > Do you have an example site or html snippet that
> > I can compare against?
>
> It's actually a rather unused tag, but here's this small
> html file from mozillas documentation:
>
> https://yari-demos.prod.mdn.mozit.cloud/en-US/docs/Web/HTML/Element/samp/_sample_.Basic_example.html
>
> My apologies, I should've included this in the first email.
>
No worries -- looks good to me.
^ 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).