From 05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sat, 20 Feb 2021 17:53:40 +0100 Subject: =?UTF-8?q?Reorganize=20tests=20=F0=9F=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/typ/markup/heading.typ | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests/typ/markup/heading.typ (limited to 'tests/typ/markup/heading.typ') diff --git a/tests/typ/markup/heading.typ b/tests/typ/markup/heading.typ new file mode 100644 index 00000000..8497ec8f --- /dev/null +++ b/tests/typ/markup/heading.typ @@ -0,0 +1,44 @@ +// Test headings. + +--- +// Different number of hashtags. + +// Valid levels. +=1 +===2 +======6 + +// Too many hashtags. +// Warning: 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 -- cgit v1.2.3