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/raw.typ | 51 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tests/typ/markup/raw.typ (limited to 'tests/typ/markup/raw.typ') diff --git a/tests/typ/markup/raw.typ b/tests/typ/markup/raw.typ new file mode 100644 index 00000000..f5074c8e --- /dev/null +++ b/tests/typ/markup/raw.typ @@ -0,0 +1,51 @@ +// Test raw blocks. + +--- +// No extra space. +`A``B` + +--- +// Typst syntax inside. +`#let x = 1` \ +`#[f 1]` + +--- +// Multiline block splits paragraphs. + +First +``` +Second +``` +Third + +--- +// Lots of backticks inside. +```` +```backticks``` +```` + +--- +// Trimming. + +// Space between "rust" and "let" is trimmed. +The keyword ```rust let```. + +// Trimming depends on number backticks. +<``> \ +<` untrimmed `> \ +<``` trimmed` ```> \ +<``` trimmed ```> \ +<``` trimmed```> + +// Multiline trimming. +```py +import this + +def hi(): + print("Hi!") +``` + +--- +// Unterminated. +// Error: 2:1 expected backtick(s) +`endless -- cgit v1.2.3