From 3163a6ccc185a902915c202c205fb89cf58ca99c Mon Sep 17 00:00:00 2001 From: Ian Butterworth Date: Mon, 21 Oct 2024 17:41:39 -0400 Subject: [PATCH] revert regex change --- stdlib/REPL/src/REPLCompletions.jl | 3 +-- stdlib/REPL/test/replcompletions.jl | 8 -------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/stdlib/REPL/src/REPLCompletions.jl b/stdlib/REPL/src/REPLCompletions.jl index fa97f901bfae1..3188a6ca42a12 100644 --- a/stdlib/REPL/src/REPLCompletions.jl +++ b/stdlib/REPL/src/REPLCompletions.jl @@ -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]) diff --git a/stdlib/REPL/test/replcompletions.jl b/stdlib/REPL/test/replcompletions.jl index 24442d868010e..cfb9a6137a287 100644 --- a/stdlib/REPL/test/replcompletions.jl +++ b/stdlib/REPL/test/replcompletions.jl @@ -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