Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stdlib/REPL/src/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ function lookup_doc(ex)
str = string(ex)
isdotted = startswith(str, ".")
if endswith(str, "=") && Base.operator_precedence(ex) == Base.prec_assignment && ex !== :(:=)
op = str[1:end-1]
op = str[begin:prevind(str, lastindex(str))]
eq = isdotted ? ".=" : "="
return Markdown.parse("`x $op= y` is a synonym for `x $eq x $op y`")
elseif isdotted && ex !== :(..)
Expand Down
6 changes: 6 additions & 0 deletions stdlib/REPL/test/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ end
# shouldn't throw when there is a space in a middle of query
@test (REPL.matchinds("a ", "a file.txt"); true)
end

@testset "Unicode doc lookup" begin
# https://github.com/JuliaLang/julia/issues/41589
# assuming ASCII is bad, m'kay?
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
end