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
)
  • Loading branch information
Seelengrab authored Jul 15, 2021
1 parent 468b157 commit be443ac
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 @@ -47,3 +47,7 @@ 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 (#41589)" begin
@test REPL.lookup_doc(:(÷=)) isa Markdown.MD
end

0 comments on commit be443ac

Please sign in to comment.