Skip to content

Commit 92765ad

Browse files
SeelengrabKristofferC
authored andcommitted
REPL doc lookup assumed ASCII for the given string, fixes #41589 (#41594)
(cherry picked from commit be443ac)
1 parent 667c883 commit 92765ad

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
@@ -27,3 +27,7 @@ end
2727
# https://github.com/JuliaLang/julia/issues/37757
2828
@test REPL.insert_hlines(IOBuffer(), nothing) === nothing
2929
end
30+
31+
@testset "Unicode doc lookup (#41589)" begin
32+
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
33+
end

0 commit comments

Comments
 (0)