From 56e9698f0fe36e9d9cff1af33fb7a9166441144d Mon Sep 17 00:00:00 2001 From: kimikage Date: Mon, 22 Jun 2020 03:20:55 +0900 Subject: [PATCH] Fix broken links in docstring of `repeat` This changes the link targets of `^` parseable and more specific. --- base/strings/basic.jl | 2 +- base/strings/string.jl | 3 ++- doc/src/base/strings.md | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/base/strings/basic.jl b/base/strings/basic.jl index ccbb2ef16cfbc..4d60bc6aa0a7b 100644 --- a/base/strings/basic.jl +++ b/base/strings/basic.jl @@ -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 diff --git a/base/strings/string.jl b/base/strings/string.jl index c267b263c66c9..6825ac29b0930 100644 --- a/base/strings/string.jl +++ b/base/strings/string.jl @@ -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 diff --git a/doc/src/base/strings.md b/doc/src/base/strings.md index 22943329af501..3fe9c59282850 100644 --- a/doc/src/base/strings.md +++ b/doc/src/base/strings.md @@ -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)