mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
45 lines
582 B
XML
45 lines
582 B
XML
// Test headings.
|
|
|
|
---
|
|
// Different number of hashtags.
|
|
|
|
// Valid levels.
|
|
=1
|
|
===2
|
|
======6
|
|
|
|
// Too many hashtags.
|
|
// Warning: 1:1-1:8 should not exceed depth 6
|
|
=======7
|
|
|
|
---
|
|
// Heading continuation over linebreak.
|
|
|
|
// Code blocks continue heading.
|
|
= A{
|
|
"B"
|
|
}
|
|
|
|
// Function call continues heading.
|
|
= #[box][
|
|
A
|
|
] B
|
|
|
|
// Without some kind of block, headings end at a line break.
|
|
= A
|
|
B
|
|
|
|
---
|
|
// Heading vs. no heading.
|
|
|
|
// Parsed as headings if at start of the context.
|
|
/**/ = Ok
|
|
{[== Ok]}
|
|
#[box][=== Ok]
|
|
|
|
// Not at the start of the context.
|
|
No = heading
|
|
|
|
// Escaped.
|
|
\= No heading
|