Skip to content

Commit 253a616

Browse files
committed
close open string token groups in SQL scanner
1 parent 603ff7d commit 253a616

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/coderay/scanners/sql.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
module CodeRay module Scanners
1+
module CodeRay
2+
module Scanners
23

34
# by Josh Goebel
45
class SQL < Scanner
5-
6+
67
register_for :sql
78

89
KEYWORDS = %w(
@@ -149,6 +150,7 @@ def scan_tokens encoder, options
149150
string_content = ''
150151
end
151152
encoder.text_token match, :error unless match.empty?
153+
encoder.end_group :string
152154
state = :initial
153155
else
154156
raise "else case \" reached; %p not handled." % peek(1), encoder
@@ -171,4 +173,5 @@ def scan_tokens encoder, options
171173

172174
end
173175

174-
end end
176+
end
177+
end

0 commit comments

Comments
 (0)