From 3f5cc3ae69ecad6a6909aad4b553eb958241dd14 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 18 Oct 2006 21:48:17 +0000 Subject: Ruby scanner: #{...} delimiters are now :inline_delimiter to solve CSS problem. New token: :inline_delimiter Scanner tests suite revamped: colorization, split up into methods. --- lib/coderay/scanners/ruby.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay/scanners/ruby.rb') diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index d15af0d..def5960 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -97,7 +97,7 @@ module Scanners state = :initial depth = 1 tokens << [:open, :inline] - tokens << [match + getch, :delimiter] + tokens << [match + getch, :inline_delimiter] when ?$, ?@ tokens << [match, :escape] last_state = state # scan one token as normal code, then return here @@ -189,7 +189,7 @@ module Scanners depth -= 1 if depth == 0 # closing brace of inline block reached state, depth, heredocs = inline_block_stack.pop - tokens << [match, :delimiter] + tokens << [match, :inline_delimiter] kind = :inline match = :close end -- cgit v1.2.1