Skip to content

Commit a24c207

Browse files
committed
fix empty token in Go scanner
1 parent 7ef6f77 commit a24c207

File tree

1 file changed

+1
-1
lines changed
  • lib/coderay/scanners

1 file changed

+1
-1
lines changed

lib/coderay/scanners/go.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def scan_tokens encoder, options
161161
encoder.text_token match, :char
162162
elsif match = scan(/ \\ | $ /x)
163163
encoder.end_group :string
164-
encoder.text_token match, :error
164+
encoder.text_token match, :error unless match.empty?
165165
state = :initial
166166
label_expected = false
167167
else

0 commit comments

Comments
 (0)