mirror of https://github.com/stelzo/typst.git
HTML export: Use `<code>` for inline `RawElem` (#5884)
This commit is contained in:
parent
d48708c5d5
commit
de16a2ced1
|
|
@ -446,10 +446,14 @@ impl Show for Packed<RawElem> {
|
||||||
let mut realized = Content::sequence(seq);
|
let mut realized = Content::sequence(seq);
|
||||||
|
|
||||||
if TargetElem::target_in(styles).is_html() {
|
if TargetElem::target_in(styles).is_html() {
|
||||||
return Ok(HtmlElem::new(tag::pre)
|
return Ok(HtmlElem::new(if self.block(styles) {
|
||||||
.with_body(Some(realized))
|
tag::pre
|
||||||
.pack()
|
} else {
|
||||||
.spanned(self.span()));
|
tag::code
|
||||||
|
})
|
||||||
|
.with_body(Some(realized))
|
||||||
|
.pack()
|
||||||
|
.spanned(self.span()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.block(styles) {
|
if self.block(styles) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue