8000 fix unclosed token group in Ruby scanner · tricknotes/coderay@c8751fb · GitHub
[go: up one dir, main page]

Skip to content

Commit c8751fb

Browse files
committed
fix unclosed token group in Ruby scanner
1 parent ad5efeb commit c8751fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def scan_tokens encoder, options
269269
end
270270

271271
if last_state
272-
state = last_state
272+
state = last_state unless state.is_a?(StringState) # otherwise, a simple 'def"' results in unclosed tokens
273273
last_state = nil
274274
end
275275

0 commit comments

Comments
 (0)
0