Skip to content

Commit

Permalink
REPL doc lookup assumed ASCII for the given string, fixes #41589 (#41594
Browse files Browse the repository at this point in the history
)

(cherry picked from commit be443ac)
  • Loading branch information
Seelengrab authored and staticfloat committed Dec 22, 2022
1 parent 55564c8 commit 635f3db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
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 = chop(str)
eq = isdotted ? ".=" : "="
return Markdown.parse("`x $op= y` is a synonym for `x $eq x $op y`")
elseif isdotted && ex !== :(..)
Expand Down
4 changes: 4 additions & 0 deletions stdlib/REPL/test/docview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ end
# https://github.com/JuliaLang/julia/issues/37757
@test REPL.insert_hlines(IOBuffer(), nothing) === nothing
end

@testset "Unicode doc lookup (#41589)" begin
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
end

0 comments on commit 635f3db

Please sign in to comment.