typst/tests/typ/markup/heading.typ
Laurenz 8207c31aec Minor refactorings
- Reorder parser methods and use `Pos` everywhere
- Remove tab special handling for columns and adapt heading/list/enum indent handling
- Don't panic when a file has an empty path
2021-08-10 11:28:12 +02:00

42 lines
527 B
XML

// Test headings.
---
// Different number of hashtags.
// Valid levels.
= Level 1
=== Level 2
====== Level 6
// Too many hashtags.
======= Level 7
---
// Heading vs. no heading.
// Parsed as headings if at start of the context.
/**/ = Level 1
{[== Level 2]}
#box[=== Level 3]
// Not at the start of the context.
No = heading
// Escaped.
\= No heading
---
// While indented at least as much as the start, the heading continues.
= This
is
indented.
= This
is not.
// Code blocks continue heading.
= A {
"B"
}