diff options
| author | Laurenz <laurmaedje@gmail.com> | 2025-02-05 14:24:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-05 13:24:10 +0000 |
| commit | 029ae4a5ea7ad1e52112ce26b6d38ce1750dae3f (patch) | |
| tree | 0c56e8c9898efff5e6735750e4291605e25a0d3f /crates/typst-library/src/text | |
| parent | 25f6a7ab161b2106c22a9997a68afee60ddb7412 (diff) | |
Export target docs (#5812)
Co-authored-by: Martin Haug <3874949+reknih@users.noreply.github.com>
Diffstat (limited to 'crates/typst-library/src/text')
| -rw-r--r-- | crates/typst-library/src/text/mod.rs | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/crates/typst-library/src/text/mod.rs b/crates/typst-library/src/text/mod.rs index f506397e..12f4e4c5 100644 --- a/crates/typst-library/src/text/mod.rs +++ b/crates/typst-library/src/text/mod.rs @@ -45,9 +45,9 @@ use typst_utils::singleton; use crate::diag::{bail, warning, HintedStrResult, SourceResult}; use crate::engine::Engine; use crate::foundations::{ - cast, category, dict, elem, Args, Array, Cast, Category, Construct, Content, Dict, - Fold, IntoValue, NativeElement, Never, NoneValue, Packed, PlainText, Regex, Repr, - Resolve, Scope, Set, Smart, StyleChain, + cast, dict, elem, Args, Array, Cast, Construct, Content, Dict, Fold, IntoValue, + NativeElement, Never, NoneValue, Packed, PlainText, Regex, Repr, Resolve, Scope, Set, + Smart, StyleChain, }; use crate::layout::{Abs, Axis, Dir, Em, Length, Ratio, Rel}; use crate::math::{EquationElem, MathSize}; @@ -55,15 +55,9 @@ use crate::model::ParElem; use crate::visualize::{Color, Paint, RelativeTo, Stroke}; use crate::World; -/// Text styling. -/// -/// The [text function]($text) is of particular interest. -#[category] -pub static TEXT: Category; - /// Hook up all `text` definitions. pub(super) fn define(global: &mut Scope) { - global.start_category(TEXT); + global.start_category(crate::Category::Text); global.define_elem::<TextElem>(); global.define_elem::<LinebreakElem>(); global.define_elem::<SmartQuoteElem>(); @@ -78,6 +72,7 @@ pub(super) fn define(global: &mut Scope) { global.define_func::<lower>(); global.define_func::<upper>(); global.define_func::<lorem>(); + global.reset_category(); } /// Customizes the look and layout of text in a variety of ways. |
