summaryrefslogtreecommitdiff
path: root/library/src/text/shift.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-12-17 16:24:29 +0100
committerLaurenz <laurmaedje@gmail.com>2022-12-17 16:24:29 +0100
commit35b16e545b4fce299edbc00c9a9754179fa51634 (patch)
treeeb1081e55187e59ff6482abc1ac2f1932606ef59 /library/src/text/shift.rs
parentb6202b646a0d5ecced301d9bac8bfcaf977d7ee4 (diff)
Document parameters in comment
Diffstat (limited to 'library/src/text/shift.rs')
-rw-r--r--library/src/text/shift.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/library/src/text/shift.rs b/library/src/text/shift.rs
index ad4a6cd9..969dce68 100644
--- a/library/src/text/shift.rs
+++ b/library/src/text/shift.rs
@@ -4,14 +4,19 @@ use typst::util::EcoString;
use super::{variant, SpaceNode, TextNode, TextSize};
use crate::prelude::*;
-/// Sub or superscript text.
+/// Sub- or superscript text.
///
-/// The text is rendered smaller and its baseline is raised. To provide the best
-/// typography possible, we first try to transform the text to superscript
-/// codepoints. If that fails, we fall back to rendering shrunk normal letters
-/// in a raised way.
+/// The text is rendered smaller and its baseline is raised/lowered. To provide
+/// the best typography possible, we first try to transform the text to
+/// superscript codepoints. If that fails, we fall back to rendering shrunk
+/// normal letters in a raised way.
///
-/// Tags: text.
+/// # Parameters
+/// - body: Content (positional, required)
+/// The text to display in sub- or superscript.
+///
+/// # Tags
+/// - text
#[func]
#[capable(Show)]
#[derive(Debug, Hash)]