From b471ac7d590abd2398ce25193b4e4df373bf2e9c Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 11 Sep 2023 14:40:22 +0200 Subject: First-class types Makes types first-class values. --- crates/typst-library/src/text/shift.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'crates/typst-library/src/text/shift.rs') diff --git a/crates/typst-library/src/text/shift.rs b/crates/typst-library/src/text/shift.rs index 65e309e1..6cb4d895 100644 --- a/crates/typst-library/src/text/shift.rs +++ b/crates/typst-library/src/text/shift.rs @@ -5,14 +5,11 @@ use crate::prelude::*; /// /// The text is rendered smaller and its baseline is lowered. /// -/// ## Example { #example } +/// # Example /// ```example /// Revenue#sub[yearly] /// ``` -/// -/// Display: Subscript -/// Category: text -#[element(Show)] +#[elem(title = "Subscript", Show)] pub struct SubElem { /// Whether to prefer the dedicated subscript characters of the font. /// @@ -68,14 +65,11 @@ impl Show for SubElem { /// /// The text is rendered smaller and its baseline is raised. /// -/// ## Example { #example } +/// # Example /// ```example /// 1#super[st] try! /// ``` -/// -/// Display: Superscript -/// Category: text -#[element(Show)] +#[elem(title = "Superscript", Show)] pub struct SuperElem { /// Whether to prefer the dedicated superscript characters of the font. /// -- cgit v1.2.3