@@ -57,7 +57,7 @@ like [`string`](@ref) but preserves any annotations present in the arguments.
57
57
58
58
```julia-repl
59
59
julia> AnnotatedString("this is an example annotated string",
60
- [(1:18, :A => 1), (12:28, :B => 2), (18:35, :C => 3)])
60
+ [(1:18, :A, 1), (12:28, :B, 2), (18:35, :C, 3)])
61
61
"this is an example annotated string"
62
62
```
63
63
"""
@@ -88,7 +88,7 @@ AnnotatedChar(s::S, annotations::Vector{$Annotation})
88
88
# Examples
89
89
90
90
```julia-repl
91
- julia> AnnotatedChar('j', :label => 1 )
91
+ julia> AnnotatedChar('j', ( :label, 1) )
92
92
'j': ASCII/Unicode U+006A (category Ll: Letter, lowercase)
93
93
```
94
94
"""
@@ -236,7 +236,7 @@ See also [`AnnotatedString`](@ref) and [`AnnotatedChar`](@ref).
236
236
julia> annotatedstring("now a AnnotatedString")
237
237
"now a AnnotatedString"
238
238
239
- julia> annotatedstring(AnnotatedString("annotated", [(1:9, :label => 1)]), ", and unannotated")
239
+ julia> annotatedstring(AnnotatedString("annotated", [(1:9, :label, 1)]), ", and unannotated")
240
240
"annotated, and unannotated"
241
241
```
242
242
"""
344
344
annotate!(str::AnnotatedString, [range::UnitRange{Int}], label::Symbol, value)
345
345
annotate!(str::SubString{AnnotatedString}, [range::UnitRange{Int}], label::Symbol, value)
346
346
347
- Annotate a `range` of `str` (or the entire string) with a labeled value (` label` => ` value`) .
347
+ Annotate a `range` of `str` (or the entire string) with a labeled value `( label, value)` .
348
348
To remove existing `label` annotations, use a value of `nothing`.
349
349
350
350
The order in which annotations are applied to `str` is semantically meaningful,
@@ -365,7 +365,7 @@ annotate!(s::SubString{<:AnnotatedString}, label::Symbol, @nospecialize(val::Any
365
365
"""
366
366
annotate!(char::AnnotatedChar, label::Symbol, value::Any)
367
367
368
- Annotate `char` with the pair ` label => value`.
368
+ Annotate `char` with the labeled value `( label, value) `.
369
369
"""
370
370
annotate! (c:: AnnotatedChar , label:: Symbol , @nospecialize (val:: Any )) =
371
371
(push! (c. annotations, Annotation ((; label, val))); c)
0 commit comments