diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-05-04 22:14:57 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-05-04 22:14:57 +0200 |
| commit | e674fd7e909c273c36952f01829544a2efc11c92 (patch) | |
| tree | c74218ce4a546de06b28aad2f73ba460338252b7 /tests/typ/text | |
| parent | 75472fee1a2377f56551fc856cf7511bd55091f0 (diff) | |
New raw theme & nicer debug representation
Diffstat (limited to 'tests/typ/text')
| -rw-r--r-- | tests/typ/text/code.typ | 57 | ||||
| -rw-r--r-- | tests/typ/text/microtype.typ | 2 | ||||
| -rw-r--r-- | tests/typ/text/raw.typ | 10 |
3 files changed, 58 insertions, 11 deletions
diff --git a/tests/typ/text/code.typ b/tests/typ/text/code.typ new file mode 100644 index 00000000..4230dd87 --- /dev/null +++ b/tests/typ/text/code.typ @@ -0,0 +1,57 @@ +// Test code highlighting. + +--- +#set text(6pt) +```typ += Chapter 1 +#lorem(100) + +#let hi = "Hello World" +``` + +--- +#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 + <!DOCTYPE html> + <html> + <head> + <meta charset="utf-8"> + </head> + <body> + <h1>Topic</h1> + <p>The Hypertext Markup Language.</p> + <script> + function foo(a, b) { + return a + b + "string"; + } + </script> + </body> + </html> + ``` +] diff --git a/tests/typ/text/microtype.typ b/tests/typ/text/microtype.typ index 991e0d0d..28d29445 100644 --- a/tests/typ/text/microtype.typ +++ b/tests/typ/text/microtype.typ @@ -5,7 +5,7 @@ #set page(width: 130pt, margins: 15pt) #set par(justify: true, linebreaks: "simple") #set text(size: 9pt) -#rect(fill: rgb(repr(teal) + "00"), width: 100%)[ +#rect(fill: rgb(0, 0, 0, 0), width: 100%)[ This is a little bit of text that builds up to hang-ing hyphens and dash---es and then, you know, some punctuation in the margin. diff --git a/tests/typ/text/raw.typ b/tests/typ/text/raw.typ index 33b08568..cf497d75 100644 --- a/tests/typ/text/raw.typ +++ b/tests/typ/text/raw.typ @@ -37,16 +37,6 @@ The keyword ```rust let```. <``` trimmed ```> \ <``` trimmed```> -// Multiline trimming and dedenting. -#block[ - ```py - import this - - def hi(): - print("Hi!") - ``` -] - --- // First line is not dedented and leading space is still possible. ``` A |
