From: Kristo <kristo.ilmari@gmail.com>
To: 9front@9front.org
Subject: [9front] mothra: fix rendering of <samp> tag
Date: Sat, 22 Jan 2022 19:30:44 +0200 [thread overview]
Message-ID: <CAAJ3RaPsVi9GciB1ofW_dkV5y1ax6uMWi-vgU8XpH3Uyj+C=VQ@mail.gmail.com> (raw)
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:
next reply other threads:[~2022-01-22 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 17:30 Kristo [this message]
2022-01-26 17:51 ` ori
2022-01-26 18:32 ` Kristo
2022-01-27 16:34 ` ori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAJ3RaPsVi9GciB1ofW_dkV5y1ax6uMWi-vgU8XpH3Uyj+C=VQ@mail.gmail.com' \
--to=kristo.ilmari@gmail.com \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).