Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fast/suggest.rb: Improve Lua quote matching.

  • Loading branch information...
commit b2ccba2888399dd95682e121147bbb3607178ca5 1 parent 567238a
Christopher Alfeld authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 fast/suggest.rb
View
4 fast/suggest.rb
@@ -85,8 +85,8 @@ def valid_pattern(s)
lua_eligible = true
end
end
- elsif lua_eligible && line =~ /\bop\(\s*(?:'|"|\[=*\[)rx(?:'|"|\]=*\])\s*,\s*(?:'|"|\[=*\[)(.+)(?:'|"|\]=*\])/
- res = [$1]
+ elsif lua_eligible && line =~ /\bop\(\s*('|"|\[(=*)\[)rx(?:'|"|\]\2\])\s*,\s*('|"|\[(=*)\[)(.+)(?:'|"|\]\4\])/
+ res = [$5]
end
elsif potential_rule(line)
res = extract_regexps(line)
Please sign in to comment.
Something went wrong with that request. Please try again.