Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Fix "#{double_quoted["hash"]}" pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
otoyo committed Dec 17, 2021
1 parent f85dd8f commit 8e97b2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/i18n/tasks/scanners/ruby_key_literals.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

module I18n::Tasks::Scanners
module RubyKeyLiterals
LITERAL_RE = /:?"[\[]*(?:\[\s*")?.+(?:"\s*\])?"|:?'.+?'|:\w+/.freeze
# NOTE
# "#{double_quoted["hash_pattern"]}" | "#{double_quoted_pattern}" | 'single_quoted_pattern' | :symbol_pattern
LITERAL_RE = /:?"[^\[]+\["[^"]+"\].+"|:?".+?"|:?'.+?'|:\w+/.freeze

# Match literals:
# * String: '', "#{}", "#{hash["key"]}"
Expand Down

0 comments on commit 8e97b2f

Please sign in to comment.