diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-30 19:40:29 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-30 20:00:50 +0100 |
| commit | a6d90c1bf1e9fefa0af04206909a40e112d6bb14 (patch) | |
| tree | fc16276142f74b9a50102a2e855942f7e2593c25 /library/src/compute/data.rs | |
| parent | f70cea508cd30fa40770ea989fe2a19e715a357b (diff) | |
Numbering functions
Diffstat (limited to 'library/src/compute/data.rs')
| -rw-r--r-- | library/src/compute/data.rs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/library/src/compute/data.rs b/library/src/compute/data.rs index bcf64360..e3013389 100644 --- a/library/src/compute/data.rs +++ b/library/src/compute/data.rs @@ -218,10 +218,7 @@ fn convert_json(value: serde_json::Value) -> Value { /// Format the user-facing JSON error message. fn format_json_error(error: serde_json::Error) -> String { assert!(error.is_syntax() || error.is_eof()); - format!( - "failed to parse json file: syntax error in line {}", - error.line() - ) + format!("failed to parse json file: syntax error in line {}", error.line()) } /// # XML @@ -252,22 +249,22 @@ fn format_json_error(error: serde_json::Error) -> String { /// let author = findChild(elem, "author") /// let pars = findChild(elem, "content") /// -/// heading((title.children)(0)) +/// heading(title.children.first()) /// text(10pt, weight: "medium")[ /// Published by -/// {(author.children)(0)} +/// {author.children.first()} /// ] /// /// for p in pars.children { /// if (type(p) == "dictionary") { /// parbreak() -/// (p.children)(0) +/// p.children.first() /// } /// } /// } /// -/// #let file = xml("example.xml") -/// #for child in file(0).children { +/// #let data = xml("example.xml") +/// #for child in data.first().children { /// if (type(child) == "dictionary") { /// article(child) /// } |
