Repository navigation
Open
Description
Description
The following code
#show par: none
#show heading: it => {
// No problem when the following two lines are exchanged
block()
it.body
}
= Section
#lorem(30)gives
thread 'main' panicked at crates/typst-pdf/src/tags/tree/build.rs:181:5:
tags weren't properly closed
stack backtrace:
0: __rustc::rust_begin_unwind
at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/std/src/panicking.rs:697:5
1: core::panicking::panic_fmt
at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/panicking.rs:75:14
2: typst_pdf::tags::tree::build::build
at /home/j/repos/typst/crates/typst-pdf/src/tags/tree/build.rs:181:5
3: typst_pdf::tags::init
at /home/j/repos/typst/crates/typst-pdf/src/tags/mod.rs:28:9
4: typst_pdf::convert::setup
at /home/j/repos/typst/crates/typst-pdf/src/convert.rs:102:16
5: typst_pdf::convert::convert
at /home/j/repos/typst/crates/typst-pdf/src/convert.rs:44:34
6: typst_pdf::pdf
at /home/j/repos/typst/crates/typst-pdf/src/lib.rs:32:5
7: typst::compile::export_pdf
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:377:18
8: typst::compile::export_paged
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:341:13
9: typst::compile::compile_and_export::{{closure}}
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:313:53
10: core::result::Result<T,E>::and_then
at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/result.rs:1381:22
11: typst::compile::compile_and_export
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:313:26
12: typst::compile::compile_once
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:248:43
13: typst::compile::compile::{{closure}}
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:43:38
14: typst::timings::Timer::record
at /home/j/repos/typst/crates/typst-cli/src/timings.rs:48:23
15: typst::compile::compile
at /home/j/repos/typst/crates/typst-cli/src/compile.rs:43:5
16: typst::dispatch
at /home/j/repos/typst/crates/typst-cli/src/main.rs:76:38
17: typst::main
at /home/j/repos/typst/crates/typst-cli/src/main.rs:58:15
18: core::ops::function::FnOnce::call_once
at /rustc/6b00bc3880198600130e1cf62b8f8a93494488cc/library/core/src/ops/function.rs:250:5
Reproduction URL
No response
Operating system
Linux
Typst version
- I am using the latest version of Typst
Activity
laurmaedje commentedon Nov 3, 2025
Minimized a bit more:
The problem is that the heading's end tag is collected into the paragraph and then
show parthrows the end tag away...[-]Crash with heading and par rules[/-][+]Internal compiler error with heading and par rules[/+][-]Internal compiler error with heading and par rules[/-][+]Internal compiler error when `show par` discards collected tag[/+]