typst/tests/lang/typ/headings.typ
2021-01-30 16:46:16 +01:00

42 lines
624 B
XML

// Test different numbers of hashtags.
// Valid levels.
= One
=== Three
====== Six
// Too many hashtags.
// Warning: 1-8 should not exceed depth 6
======= Seven
---
// Test heading vs. no heading.
// Parsed as headings if at start of the context.
/**/ = Heading
{[== Heading]}
#[box][=== Heading]
// Not at the start of the context.
Text = with=sign
// Escaped.
\= No heading
---
// Heading continuation over linebreak.
// Code blocks continue heading.
= This {
"continues"
}
// Function call continues heading.
= #[box][
This,
] too
// Without some kind of block, headings end at a line break.
= This
not