Skip to content

Allow {{< contents >}} to pull inlines #13121

@cscheid

Description

@cscheid

In the contents example in the docs, if we switch the format to typst, things currently break. This happens ultimately because of #7062, where in Jupyter sometimes cells get no id (and the id is placed on the image). In that case, contents doesn't find a div and fails.

One workaround is to use fenced divs. But contents exists in large part to support Jupyter workflows, and fenced divs look bad in Jupyter workflows.

Instead, we can fix the bug by searching for Inline nodes that have that ID, and returning them wrapped around a Div scaffold.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingjupytershortcodesissues related to shortcodestypst

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions