typst/tests/typ/markup/linebreak.typ
Laurenz 5e08028fb3 Syntax functions 🚀
This adds overridable functions that markup desugars into. Specifically:
- \ desugars into linebreak
- Two newlines desugar into parbreak
- * desugars into strong
- _ desugars into emph
- = .. desugars into heading
- `..` desugars into raw
2021-03-21 17:50:56 +01:00

32 lines
442 B
Typst

// Test forced line breaks.
---
// Directly after word.
Line\ Break
// Spaces around.
Line \ Break
// Directly before word does not work.
No \Break
---
// Leading line break.
\ Leading
// Trailing before paragraph break.
Trailing 1 \
Trailing 2
// Trailing before end of document.
Trailing 3 \
---
#let linebreak() = [
// Inside the old line break definition is still active.
#circle(radius: 2pt, fill: #000) \
]
A \ B \ C \