summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-10-16 10:50:34 +0000
committermurphy <murphy@rubychan.de>2005-10-16 10:50:34 +0000
commita4052158f89068317e5a374cc553ef95de1a842a (patch)
tree19727dcdbac840d562279e876ddfafa00a52dc95 /lib/coderay/scanners/ruby.rb
parent48e144a20829faaeca9a7db8fbc6128f1f5d7297 (diff)
downloadcoderay-a4052158f89068317e5a374cc553ef95de1a842a.tar.gz
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!
Diffstat (limited to 'lib/coderay/scanners/ruby.rb')
-rw-r--r--lib/coderay/scanners/ruby.rb7
1 files changed, 3 insertions, 4 deletions
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