Skip to content

Commit

Permalink
revert regex change
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Oct 21, 2024
1 parent 578c7b9 commit 3163a6c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions stdlib/REPL/src/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,7 @@ function completions(string::String, pos::Int, context_module::Module=Main, shif
# ?(x, y)TAB lists methods you can call with these objects
# ?(x, y TAB lists methods that take these objects as the first two arguments
# MyModule.?(x, y)TAB restricts the search to names in MyModule
# but ignore ?( inside strings
rexm = match(r"^(?!\")(?:\w+\.|)\?\((.*)$", partial)
rexm = match(r"(\w+\.|)\?\((.*)$", partial)
if rexm !== nothing
# Get the module scope
if isempty(rexm.captures[1])
Expand Down
8 changes: 0 additions & 8 deletions stdlib/REPL/test/replcompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -768,14 +768,6 @@ end
# https://github.com/JuliaLang/julia/issues/52551
@test !isempty(test_complete("?("))

# issue #56272: Ignore ?( in strings
@test isempty(test_complete("\"?(\""))
@test isempty(test_complete("\"foo?(\""))
@test isempty(test_complete("\"?(foo\""))
@test isempty(test_complete("\"\"\"?(\"\"\""))
@test isempty(test_complete("\"\"\"foo?(\"\"\""))
@test isempty(test_complete("\"\"\"?(foo\"\"\""))

#################################################################

# Test method completion with varargs
Expand Down

0 comments on commit 3163a6c

Please sign in to comment.