mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Bump lipsum
This commit is contained in:
parent
2fe549c1ec
commit
891af17260
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -321,7 +321,7 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "lipsum"
|
name = "lipsum"
|
||||||
version = "0.8.2"
|
version = "0.8.2"
|
||||||
source = "git+https://github.com/reknih/lipsum#d6d8f2cba12f8dee8c8ed4af62858cdb061c0801"
|
source = "git+https://github.com/reknih/lipsum#025427353ab32268daa3d96feda380a96db529c5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rand",
|
"rand",
|
||||||
"rand_chacha",
|
"rand_chacha",
|
||||||
|
@ -16,7 +16,7 @@ typst-macros = { path = "./macros" }
|
|||||||
# Utilities
|
# Utilities
|
||||||
bytemuck = "1"
|
bytemuck = "1"
|
||||||
fxhash = "0.2"
|
fxhash = "0.2"
|
||||||
lipsum = { git = "https://github.com/reknih/lipsum", default-features = false }
|
lipsum = { git = "https://github.com/reknih/lipsum" }
|
||||||
once_cell = "1"
|
once_cell = "1"
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
typed-arena = "2"
|
typed-arena = "2"
|
||||||
|
@ -176,7 +176,7 @@ impl Frame {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to copy the elements without adjusting the positioned.
|
// Try to copy the elements without adjusting the position.
|
||||||
// Also try to reuse the elements if the Arc isn't shared.
|
// Also try to reuse the elements if the Arc isn't shared.
|
||||||
let range = layer .. layer;
|
let range = layer .. layer;
|
||||||
if pos.is_zero() {
|
if pos.is_zero() {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use lipsum::lipsum_from_seed;
|
|
||||||
|
|
||||||
use crate::eval::Regex;
|
use crate::eval::Regex;
|
||||||
use crate::library::prelude::*;
|
use crate::library::prelude::*;
|
||||||
|
|
||||||
@ -22,7 +20,7 @@ pub fn str(_: &mut Machine, args: &mut Args) -> TypResult<Value> {
|
|||||||
/// Create blind text.
|
/// Create blind text.
|
||||||
pub fn lorem(_: &mut Machine, args: &mut Args) -> TypResult<Value> {
|
pub fn lorem(_: &mut Machine, args: &mut Args) -> TypResult<Value> {
|
||||||
let words: usize = args.expect("number of words")?;
|
let words: usize = args.expect("number of words")?;
|
||||||
Ok(Value::Str(lipsum_from_seed(words, 97).into()))
|
Ok(Value::Str(lipsum::lipsum(words).into()))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a regular expression.
|
/// Create a regular expression.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user