Skip to content

Commit

Permalink
Fix broken links in docstring of repeat (#36376)
Browse files Browse the repository at this point in the history
This changes the link targets of `^` parseable and more specific.
  • Loading branch information
kimikage committed Jun 25, 2020
1 parent 32b1b14 commit 0a661f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/strings/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ reverseind(s::AbstractString, i::Integer) = thisind(s, ncodeunits(s)-i+1)
Repeat a string `r` times. This can be written as `s^r`.
See also: [`^`](@ref)
See also: [`^`](@ref :^(::Union{AbstractString, AbstractChar}, ::Integer))
# Examples
```jldoctest
Expand Down
3 changes: 2 additions & 1 deletion base/strings/string.jl
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ end
"""
repeat(c::AbstractChar, r::Integer) -> String
Repeat a character `r` times. This can equivalently be accomplished by calling [`c^r`](@ref ^).
Repeat a character `r` times. This can equivalently be accomplished by calling
[`c^r`](@ref :^(::Union{AbstractString, AbstractChar}, ::Integer)).
# Examples
```jldoctest
Expand Down
2 changes: 1 addition & 1 deletion doc/src/base/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Base.codepoint
Base.length(::AbstractString)
Base.sizeof(::AbstractString)
Base.:*(::Union{AbstractChar, AbstractString}, ::Union{AbstractChar, AbstractString}...)
Base.:^(::AbstractString, ::Integer)
Base.:^(::Union{AbstractString, AbstractChar}, ::Integer)
Base.string
Base.repeat(::AbstractString, ::Integer)
Base.repeat(::AbstractChar, ::Integer)
Expand Down

0 comments on commit 0a661f9

Please sign in to comment.