summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-23 06:39:30 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-23 06:39:30 +0200
commit253a616924000cc5d522a2d4b8030f5693c98e43 (patch)
tree49600fc98640cc3c3c719069c611e1bb18774d3b
parent603ff7d0b14521cfd0408aa68e2e1cb6ea9086bc (diff)
downloadcoderay-253a616924000cc5d522a2d4b8030f5693c98e43.tar.gz
close open string token groups in SQL scanner
-rw-r--r--lib/coderay/scanners/sql.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/coderay/scanners/sql.rb b/lib/coderay/scanners/sql.rb
index b757278..93aeaf3 100644
--- a/lib/coderay/scanners/sql.rb
+++ b/lib/coderay/scanners/sql.rb
@@ -1,8 +1,9 @@
-module CodeRay module Scanners
+module CodeRay
+module Scanners
# by Josh Goebel
class SQL < Scanner
-
+
register_for :sql
KEYWORDS = %w(
@@ -149,6 +150,7 @@ module CodeRay module Scanners
string_content = ''
end
encoder.text_token match, :error unless match.empty?
+ encoder.end_group :string
state = :initial
else
raise "else case \" reached; %p not handled." % peek(1), encoder
@@ -171,4 +173,5 @@ module CodeRay module Scanners
end
-end end \ No newline at end of file
+end
+end