Skip to content

Commit 0a661f9

Browse files
authored
Fix broken links in docstring of repeat (#36376)
This changes the link targets of `^` parseable and more specific.
1 parent 32b1b14 commit 0a661f9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

base/strings/basic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ reverseind(s::AbstractString, i::Integer) = thisind(s, ncodeunits(s)-i+1)
686686
687687
Repeat a string `r` times. This can be written as `s^r`.
688688
689-
See also: [`^`](@ref)
689+
See also: [`^`](@ref :^(::Union{AbstractString, AbstractChar}, ::Integer))
690690
691691
# Examples
692692
```jldoctest

base/strings/string.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ end
321321
"""
322322
repeat(c::AbstractChar, r::Integer) -> String
323323
324-
Repeat a character `r` times. This can equivalently be accomplished by calling [`c^r`](@ref ^).
324+
Repeat a character `r` times. This can equivalently be accomplished by calling
325+
[`c^r`](@ref :^(::Union{AbstractString, AbstractChar}, ::Integer)).
325326
326327
# Examples
327328
```jldoctest

doc/src/base/strings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Base.codepoint
77
Base.length(::AbstractString)
88
Base.sizeof(::AbstractString)
99
Base.:*(::Union{AbstractChar, AbstractString}, ::Union{AbstractChar, AbstractString}...)
10-
Base.:^(::AbstractString, ::Integer)
10+
Base.:^(::Union{AbstractString, AbstractChar}, ::Integer)
1111
Base.string
1212
Base.repeat(::AbstractString, ::Integer)
1313
Base.repeat(::AbstractChar, ::Integer)

0 commit comments

Comments
 (0)