diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/coderay/scanners/ruby.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index 9515bdc..4244ab7 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -16,6 +16,10 @@ module Scanners autoload :Patterns, 'coderay/scanners/ruby/patterns' autoload :StringState, 'coderay/scanners/ruby/string_state' + def interpreted_string_state + StringState.new :string, true, '"' + end + protected def setup @@ -23,7 +27,7 @@ module Scanners end def scan_tokens encoder, options - state, heredocs = @state + state, heredocs = options[:state] || @state heredocs = heredocs.dup if heredocs.is_a?(Array) if state && state.instance_of?(StringState) |