From 543dc2ac078370d2bfab8312f9dc3b818c7a2e52 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Sun, 11 Jun 2023 18:31:06 -0400 Subject: [PATCH 1/2] engine_spx2html: close automatic tags when starting certain automatic tags --- crates/engine_spx2html/src/emission.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/engine_spx2html/src/emission.rs b/crates/engine_spx2html/src/emission.rs index 19ff5075b..c773755ae 100644 --- a/crates/engine_spx2html/src/emission.rs +++ b/crates/engine_spx2html/src/emission.rs @@ -424,6 +424,8 @@ impl EmittingState { match special { Special::AutoStartParagraph => { if self.cur_elstate().do_auto_tags { + self.close_automatics(); + // Why are we using
s instead of

? As the HTML spec // emphasizes,

tags are structural, not semantic. You cannot // put tags like