diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2012-10-29 02:46:46 +0100 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2012-10-29 02:46:46 +0100 |
commit | f0ab3fbf7fcea91ecc65d3bc9d2662642f19b332 (patch) | |
tree | e4e46f112dd99258b18b0819fa87a9ecbc3a83c4 /lib/coderay | |
parent | 11807f130e745e414d8910423a3257832347d237 (diff) | |
parent | cab119c814b3470a7dd3e8079df0d95f9151da42 (diff) | |
download | coderay-f0ab3fbf7fcea91ecc65d3bc9d2662642f19b332.tar.gz |
Merge branch 'master' into bash-scanner
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/encoders/html/numbering.rb | 2 | ||||
-rw-r--r-- | lib/coderay/encoders/terminal.rb | 2 | ||||
-rw-r--r-- | lib/coderay/helpers/word_list.rb | 5 | ||||
-rw-r--r-- | lib/coderay/scanners/html.rb | 5 | ||||
-rw-r--r-- | lib/coderay/version.rb | 2 |
5 files changed, 7 insertions, 9 deletions
diff --git a/lib/coderay/encoders/html/numbering.rb b/lib/coderay/encoders/html/numbering.rb index 8bc6259..e717429 100644 --- a/lib/coderay/encoders/html/numbering.rb +++ b/lib/coderay/encoders/html/numbering.rb @@ -17,7 +17,7 @@ module Encoders anchor_prefix = options[:line_number_anchors] anchor_prefix = 'line' if anchor_prefix == true - anchor_prefix = anchor_prefix.to_s[/\w+/] if anchor_prefix + anchor_prefix = anchor_prefix.to_s[/[\w-]+/] if anchor_prefix anchoring = if anchor_prefix proc do |line| diff --git a/lib/coderay/encoders/terminal.rb b/lib/coderay/encoders/terminal.rb index 005032d..a0ceb3c 100644 --- a/lib/coderay/encoders/terminal.rb +++ b/lib/coderay/encoders/terminal.rb @@ -62,7 +62,6 @@ module CodeRay :content => '31', :delimiter => '1;29', :modifier => '35', - :function => '1;29' }, :reserved => '1;31', :shell => { @@ -75,6 +74,7 @@ module CodeRay :modifier => '1;32', :escape => '1;36', :delimiter => '1;32', + :char => '1;36', }, :symbol => '1;32', :tag => '1;34', diff --git a/lib/coderay/helpers/word_list.rb b/lib/coderay/helpers/word_list.rb index ea969c3..4a42c4a 100644 --- a/lib/coderay/helpers/word_list.rb +++ b/lib/coderay/helpers/word_list.rb @@ -4,11 +4,6 @@ module CodeRay # # <b>A Hash subclass designed for mapping word lists to token types.</b> # - # Copyright (c) 2006-2011 by murphy (Kornelius Kalnbach) <murphy rubychan de> - # - # License:: LGPL / ask the author - # Version:: 2.0 (2011-05-08) - # # A WordList is a Hash with some additional features. # It is intended to be used for keyword recognition. # diff --git a/lib/coderay/scanners/html.rb b/lib/coderay/scanners/html.rb index 733dd6f..49c346d 100644 --- a/lib/coderay/scanners/html.rb +++ b/lib/coderay/scanners/html.rb @@ -69,6 +69,7 @@ module Scanners def setup @state = :initial @plain_string_content = nil + @in_tag = nil end def scan_java_script encoder, code @@ -83,7 +84,8 @@ module Scanners def scan_tokens encoder, options state = options[:state] || @state plain_string_content = @plain_string_content - in_tag = in_attribute = nil + in_tag = @in_tag + in_attribute = nil encoder.begin_group :string if state == :attribute_value_string @@ -237,6 +239,7 @@ module Scanners if options[:keep_state] @state = state @plain_string_content = plain_string_content + @in_tag = in_tag end encoder.end_group :string if state == :attribute_value_string diff --git a/lib/coderay/version.rb b/lib/coderay/version.rb index 620e703..87d1cff 100644 --- a/lib/coderay/version.rb +++ b/lib/coderay/version.rb @@ -1,3 +1,3 @@ module CodeRay - VERSION = '1.0.7' + VERSION = '1.0.8' end |