9front - general discussion about 9front
 help / color / mirror / Atom feed
From: james@biobuf.link
To: 9front@9front.org
Subject: [9front] [PATCH] mothra: display figure captions correctly.
Date: Wed, 08 Sep 2021 06:38:23 +0000	[thread overview]
Message-ID: <cb86f3226fdab65370dc75159b23c852@biobuf.link> (raw)

this patch means that figure captions under images
will not be displayed in-line with the image.

---
diff 87a823332f9eaa4ff1e72f8524f6e59d1cc4f407 5da26d78e10d75b8a7502c9d80c9238d62f01419
--- a/sys/src/cmd/mothra/html.h	Mon Sep  6 22:04:35 2021
+++ b/sys/src/cmd/mothra/html.h	Wed Sep  8 07:35:57 2021
@@ -158,6 +158,8 @@
 	Tag_font,
 	Tag_form,
 	Tag_frame,	/* rm 5.8.97 */
+	Tag_figure,
+	Tag_figcaption,
 	Tag_h1,
 	Tag_h2,
 	Tag_h3,
--- a/sys/src/cmd/mothra/html.syntax.c	Mon Sep  6 22:04:35 2021
+++ b/sys/src/cmd/mothra/html.syntax.c	Wed Sep  8 07:35:57 2021
@@ -35,6 +35,8 @@
 [Tag_font]	"font",		END,
 [Tag_form]	"form",		END,
 [Tag_frame]	"frame",	NOEND,
+[Tag_figure] "figure",  END,
+[Tag_figcaption] "figcaption", END,
 [Tag_h1]	"h1",		END,
 [Tag_h2]	"h2",		END,
 [Tag_h3]	"h3",		END,
--- a/sys/src/cmd/mothra/rdhtml.c	Mon Sep  6 22:04:35 2021
+++ b/sys/src/cmd/mothra/rdhtml.c	Wed Sep  8 07:35:57 2021
@@ -1142,6 +1142,10 @@
 		case Tag_style:
 			g.state->isscript=1;
 			break;
+		case Tag_figure:
+		case Tag_figcaption:
+			g.linebrk=1;
+			break;
 		}
 		break;

                 reply	other threads:[~2021-09-08  9:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=cb86f3226fdab65370dc75159b23c852@biobuf.link \
    --to=james@biobuf.link \
    --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).