diff options
Diffstat (limited to 'tests/typ/markup/raw.typ')
| -rw-r--r-- | tests/typ/markup/raw.typ | 51 |
1 files changed, 51 insertions, 0 deletions
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 |
