Skip to content

Commit 89d1de6

Browse files
SeelengrabKristofferC
authored andcommitted
REPL doc lookup assumed ASCII for the given string, fixes #41589 (#41594)
(cherry picked from commit be443ac)
1 parent 6c944ee commit 89d1de6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

stdlib/REPL/src/docview.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ function lookup_doc(ex)
221221
str = string(ex)
222222
isdotted = startswith(str, ".")
223223
if endswith(str, "=") && Base.operator_precedence(ex) == Base.prec_assignment && ex !== :(:=)
224-
op = str[1:end-1]
224+
op = chop(str)
225225
eq = isdotted ? ".=" : "="
226226
return Markdown.parse("`x $op= y` is a synonym for `x $eq x $op y`")
227227
elseif isdotted && ex !== :(..)

stdlib/REPL/test/docview.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ end
4747
# shouldn't throw when there is a space in a middle of query
4848
@test (REPL.matchinds("a ", "a file.txt"); true)
4949
end
50+
51+
@testset "Unicode doc lookup (#41589)" begin
52+
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
53+
end

0 commit comments

Comments
 (0)