From 66679920b25a80bf106148b59642fbae166e0d7a Mon Sep 17 00:00:00 2001 From: Tijme <68817281+7ijme@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:32:06 +0100 Subject: [PATCH] Fix docs example with type/string comparison (#5987) --- crates/typst-library/src/loading/xml.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/typst-library/src/loading/xml.rs b/crates/typst-library/src/loading/xml.rs index daccd02fc..e76c4e9cf 100644 --- a/crates/typst-library/src/loading/xml.rs +++ b/crates/typst-library/src/loading/xml.rs @@ -34,14 +34,14 @@ use crate::loading::{DataSource, Load, Readable}; /// let author = find-child(elem, "author") /// let pars = find-child(elem, "content") /// -/// heading(title.children.first()) +/// [= #title.children.first()] /// text(10pt, weight: "medium")[ /// Published by /// #author.children.first() /// ] /// /// for p in pars.children { -/// if (type(p) == "dictionary") { +/// if type(p) == dictionary { /// parbreak() /// p.children.first() /// } @@ -50,7 +50,7 @@ use crate::loading::{DataSource, Load, Readable}; /// /// #let data = xml("example.xml") /// #for elem in data.first().children { -/// if (type(elem) == "dictionary") { +/// if type(elem) == dictionary { /// article(elem) /// } /// }