mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Update examples due to new syntax highlighting 🌹
This commit is contained in:
parent
1ece263579
commit
7d853cbea1
@ -141,7 +141,7 @@ fn test(name: &str, src: &str) {
|
||||
fn preprocess<'a>(src: &'a str) -> (String, Option<Size2D>) {
|
||||
let include_regex = Regex::new(r"\{include:((.|\.|\-)*)\}").unwrap();
|
||||
let lorem_regex = Regex::new(r"\{lorem:(\d*)\}").unwrap();
|
||||
let size_regex = Regex::new(r"\{(size:(([\d\w]*)\*([\d\w]*)))\}").unwrap();
|
||||
let size_regex = Regex::new(r"\{(size:(([\d\w]*)\sx\s([\d\w]*)))\}").unwrap();
|
||||
|
||||
let mut size = None;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{size:150pt*215pt}
|
||||
{size:150pt x 215pt}
|
||||
|
||||
// ---------------------------------- //
|
||||
// Without newline in between.
|
||||
|
@ -1,4 +1,4 @@
|
||||
{size:420pt*300pt}
|
||||
{size:420pt x 300pt}
|
||||
|
||||
[box: flow = horizontal][
|
||||
*Technical University Berlin* [n]
|
||||
|
@ -1,4 +1,4 @@
|
||||
{size:150pt*200pt}
|
||||
{size:150pt x 200pt}
|
||||
{lorem:100}
|
||||
|
||||
[page.break]
|
||||
|
@ -1,4 +1,4 @@
|
||||
{size:250pt*500pt}
|
||||
{size:250pt x 500pt}
|
||||
|
||||
_Emoji:_ Hello World! 🌍
|
||||
|
||||
@ -9,14 +9,11 @@ _Styles with functions:_ This [bold][word] is made bold and [italic][that] itali
|
||||
using the standard library functions `bold` and `italic`!
|
||||
|
||||
[italic]
|
||||
Styles can also be changed through [bold] context modification.
|
||||
Styles can also be changed through context modification.
|
||||
This works basically in the same way as the built-in syntax.
|
||||
_
|
||||
|
||||
This is not italic anymore, but still bold.
|
||||
[bold]
|
||||
|
||||
This is completely reset. 😀
|
||||
This is not italic anymore. 😀
|
||||
|
||||
[box][
|
||||
[italic]
|
||||
|
Loading…
x
Reference in New Issue
Block a user