Mention str(<label>)
feature in documentation for label
(#2906)
This commit is contained in:
parent
d52fcd5b46
commit
ce9d420472
@ -12,6 +12,9 @@ use crate::util::PicoStr;
|
||||
/// A labelled element can be [referenced]($ref), [queried]($query) for, and
|
||||
/// [styled]($styling) through its label.
|
||||
///
|
||||
/// Once constructed, you can get the name of a label using
|
||||
/// [`str`]($str/#constructor).
|
||||
///
|
||||
/// # Example
|
||||
/// ```example
|
||||
/// #show <a>: set text(blue)
|
||||
|
@ -63,3 +63,10 @@ _Visible_
|
||||
#test([Hello<hi>].label, <hi>)
|
||||
#test([#[A *B* C]<hi>].label, <hi>)
|
||||
#test([#text(red)[Hello]<hi>].label, <hi>)
|
||||
|
||||
---
|
||||
// Test getting the name of a label.
|
||||
// Ref: false
|
||||
#test(str(<hey>), "hey")
|
||||
#test(str(label("hey")), "hey")
|
||||
#test(str([Hmm<hey>].label), "hey")
|
||||
|
Loading…
x
Reference in New Issue
Block a user