class Rouge::Lexers::Escape
def stream_tokens(str, &b)
def stream_tokens(str, &b) stream = StringScanner.new(str) loop do if stream.scan(to_start_regex) puts "pre-escape: #{stream[1].inspect}" if @debug @lang.continue_lex(stream[1], &b) else # no more start delimiters, scan til the end @lang.continue_lex(stream.rest, &b) return end if stream.scan(to_end_regex) yield Token::Tokens::Escape, stream[1] else yield Token::Tokens::Escape, stream.rest return end end end