From a4052158f89068317e5a374cc553ef95de1a842a Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 16 Oct 2005 10:50:34 +0000 Subject: scanners/ruby.rb: fixed string inline code encoders/helpers/html_css.rb and html_helper.rb: added :inline token encoders/helpers/html_output.rb: made wrapped_in an attr_accessor; fixed option handling in numerize! --- lib/coderay/scanners/ruby.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lib/coderay/scanners/ruby.rb') diff --git a/lib/coderay/scanners/ruby.rb b/lib/coderay/scanners/ruby.rb index a50893a..1ceb3d5 100644 --- a/lib/coderay/scanners/ruby.rb +++ b/lib/coderay/scanners/ruby.rb @@ -43,7 +43,6 @@ module CodeRay module Scanners if state.instance_of? StringState # {{{ - match = scan_until(state.pattern) || scan_until(/\z/) tokens << [match, :content] unless match.empty? break if eos? @@ -128,7 +127,7 @@ module CodeRay module Scanners fancy_allowed = regexp_allowed = true state = :initial depth = 1 - tokens << [:open, :escape] + tokens << [:open, :inline] tokens << [match + getch, :delimiter] when ?$, ?@ tokens << [match, :escape] @@ -196,8 +195,8 @@ module CodeRay module Scanners depth -= 1 if depth == 0 state, depth, heredocs = states.pop - tokens << [match + getch, :delimiter] - type = :escape + tokens << [match, :delimiter] + type = :inline match = :close end end -- cgit v1.2.1