HTML export: Use <code> for inline RawElem (#5884)

This commit is contained in:
ᡥᠠᡳᡤᡳᠶᠠ ᡥᠠᠯᠠ·ᠨᡝᡴᠣ 猫 2025-02-18 18:16:19 +08:00 committed by GitHub
parent 25c86accbb
commit 74e4f78687
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -446,10 +446,14 @@ impl Show for Packed<RawElem> {
let mut realized = Content::sequence(seq);
if TargetElem::target_in(styles).is_html() {
return Ok(HtmlElem::new(tag::pre)
.with_body(Some(realized))
.pack()
.spanned(self.span()));
return Ok(HtmlElem::new(if self.block(styles) {
tag::pre
} else {
tag::code
})
.with_body(Some(realized))
.pack()
.spanned(self.span()));
}
if self.block(styles) {