mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
HTML export: Use <code>
for inline RawElem
(#5884)
This commit is contained in:
parent
25c86accbb
commit
74e4f78687
@ -446,7 +446,11 @@ 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) {
|
||||||
|
tag::pre
|
||||||
|
} else {
|
||||||
|
tag::code
|
||||||
|
})
|
||||||
.with_body(Some(realized))
|
.with_body(Some(realized))
|
||||||
.pack()
|
.pack()
|
||||||
.spanned(self.span()));
|
.spanned(self.span()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user