From 6e28b0e162d151883973652726b5793cd8fa8538 Mon Sep 17 00:00:00 2001 From: Noah Hellman Date: Sun, 15 Jan 2023 20:06:51 +0100 Subject: [PATCH] html: ignore attrs on inline quotes --- src/html.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/html.rs b/src/html.rs index c3d1e04..2172740 100644 --- a/src/html.rs +++ b/src/html.rs @@ -116,6 +116,10 @@ impl<'s, I: Iterator>, W: std::fmt::Write> Writer { Container::DoubleQuoted => self.out.write_str("“")?, } + if matches!(c, Container::SingleQuoted | Container::DoubleQuoted) { + continue; // TODO add span to allow attributes? + } + if attrs.iter().any(|(a, _)| a == "class") || matches!( c,