mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
parent
0c33a64481
commit
2d6a79ba32
@ -583,6 +583,10 @@ struct DisplayElem {
|
|||||||
|
|
||||||
impl Show for DisplayElem {
|
impl Show for DisplayElem {
|
||||||
fn show(&self, vt: &mut Vt, styles: StyleChain) -> SourceResult<Content> {
|
fn show(&self, vt: &mut Vt, styles: StyleChain) -> SourceResult<Content> {
|
||||||
|
if !vt.introspector.init() {
|
||||||
|
return Ok(Content::empty());
|
||||||
|
}
|
||||||
|
|
||||||
let location = self.0.location().unwrap();
|
let location = self.0.location().unwrap();
|
||||||
let counter = self.counter();
|
let counter = self.counter();
|
||||||
let numbering = self
|
let numbering = self
|
||||||
|
@ -393,6 +393,10 @@ struct DisplayElem {
|
|||||||
|
|
||||||
impl Show for DisplayElem {
|
impl Show for DisplayElem {
|
||||||
fn show(&self, vt: &mut Vt, _: StyleChain) -> SourceResult<Content> {
|
fn show(&self, vt: &mut Vt, _: StyleChain) -> SourceResult<Content> {
|
||||||
|
if !vt.introspector.init() {
|
||||||
|
return Ok(Content::empty());
|
||||||
|
}
|
||||||
|
|
||||||
let location = self.0.location().unwrap();
|
let location = self.0.location().unwrap();
|
||||||
let value = self.state().at(vt, location)?;
|
let value = self.state().at(vt, location)?;
|
||||||
Ok(match self.func() {
|
Ok(match self.func() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user