From 9e918d06adfdd680f153784e85657e45e9675ec6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 3 Feb 2023 17:46:53 +0100 Subject: Fix function call highlighting --- tests/typ/text/raw-code.typ | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/typ/text/raw-code.typ (limited to 'tests/typ/text/raw-code.typ') diff --git a/tests/typ/text/raw-code.typ b/tests/typ/text/raw-code.typ new file mode 100644 index 00000000..d89f1c05 --- /dev/null +++ b/tests/typ/text/raw-code.typ @@ -0,0 +1,58 @@ +// Test code highlighting. + +--- +#set text(6pt) +```typ += Chapter 1 +#lorem(100) + +#let hi = "Hello World" +#show heading: emph +``` + +--- +#set page(width: 180pt) +#set text(6pt) + +```rust +/// A carefully designed state machine. +#[derive(Debug)] +enum State<'a> { A(u8), B(&'a str) } + +fn advance(state: State<'_>) -> State<'_> { + unimplemented!("state machine") +} +``` + +--- +#set text(6pt) +```py +import this + +def hi(): + print("Hi!") +``` + +--- +#set page(width: 180pt) +#set text(6pt) + +#rect(inset: (x: 4pt, y: 5pt), radius: 4pt, fill: rgb(239, 241, 243))[ + ```html + + + + + + +

Topic

+

The Hypertext Markup Language.

+ + + + ``` +] -- cgit v1.2.3