./lib/coderay/scanners/nitro_xhtml.rb in coderay-0.9.7 vs ./lib/coderay/scanners/nitro_xhtml.rb in coderay-0.9.8.pre
- old
+ new
@@ -87,10 +87,10 @@
def scan_tokens tokens, options
until eos?
- if (match = scan_until(/(?=#{START_OF_RUBY})/o) || scan_until(/\z/)) and not match.empty?
+ if (match = scan_until(/(?=#{START_OF_RUBY})/o) || scan_rest) && !match.empty?
@html_scanner.tokenize match
elsif match = scan(/#{NITRO_VALUE_BLOCK}/o)
start_tag = match[0,2]
delimiter = CLOSING_PAREN[start_tag[1,1]]