summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/groovy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners/groovy.rb')
-rw-r--r--lib/coderay/scanners/groovy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coderay/scanners/groovy.rb b/lib/coderay/scanners/groovy.rb
index d04a535..c64454f 100644
--- a/lib/coderay/scanners/groovy.rb
+++ b/lib/coderay/scanners/groovy.rb
@@ -226,7 +226,7 @@ module Scanners
encoder.text_token match, :content # TODO: Shouldn't this be :error?
elsif match = scan(/ \\ | \n /x)
- encoder.end_group state
+ encoder.end_group state == :regexp ? :regexp : :string
encoder.text_token match, :error
after_def = value_expected = false
state = :initial
@@ -246,7 +246,7 @@ module Scanners
end
if [:multiline_string, :string, :regexp].include? state
- encoder.end_group state
+ encoder.end_group state == :regexp ? :regexp : :string
end
if options[:keep_state]
@@ -256,7 +256,7 @@ module Scanners
until inline_block_stack.empty?
state, = *inline_block_stack.pop
encoder.end_group :inline
- encoder.end_group state
+ encoder.end_group state == :regexp ? :regexp : :string
end
encoder