summaryrefslogtreecommitdiff
path: root/tests/typ/markup/raw.typ
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-02-20 17:53:40 +0100
committerLaurenz <laurmaedje@gmail.com>2021-02-20 23:34:33 +0100
commit05727bfc3a9cfd45a8e2028dfd0806f7a8f88015 (patch)
tree6c0b66eb2a9dff224cb39eb6ccb478656a706c04 /tests/typ/markup/raw.typ
parent927341d93ae29678095e3b874bd68bfc57d4bc05 (diff)
Reorganize tests 🔀
Diffstat (limited to 'tests/typ/markup/raw.typ')
-rw-r--r--tests/typ/markup/raw.typ51
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