diff options
Diffstat (limited to 'lib/coderay/scanners')
-rw-r--r-- | lib/coderay/scanners/ruby.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index a50893a..1ceb3d5 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -43,7 +43,6 @@ module CodeRay module Scanners if state.instance_of? StringState
# {{{
-
match = scan_until(state.pattern) || scan_until(/\z/)
tokens << [match, :content] unless match.empty?
break if eos?
@@ -128,7 +127,7 @@ module CodeRay module Scanners fancy_allowed = regexp_allowed = true
state = :initial
depth = 1
- tokens << [:open, :escape]
+ tokens << [:open, :inline]
tokens << [match + getch, :delimiter]
when ?$, ?@
tokens << [match, :escape]
@@ -196,8 +195,8 @@ module CodeRay module Scanners depth -= 1
if depth == 0
state, depth, heredocs = states.pop
- tokens << [match + getch, :delimiter]
- type = :escape
+ tokens << [match, :delimiter]
+ type = :inline
match = :close
end
end
|