diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2012-10-11 02:23:49 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2012-10-11 02:23:49 +0200 |
commit | 43ad09c3474b5ff366398c0e2454bacf9e39d394 (patch) | |
tree | 12c90b3f59dedd0cbfacb00f668c03f550acc563 /lib/coderay | |
parent | 1f88ad0c81707c5419e93141d5acddd842f8afe7 (diff) | |
parent | 3effca8291ed4941f7b3a1c2088b50274f28aa6f (diff) | |
download | coderay-43ad09c3474b5ff366398c0e2454bacf9e39d394.tar.gz |
Merge branch 'master' into multiline-inline-diff
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/encoders/html/numbering.rb | 2 | ||||
-rw-r--r-- | lib/coderay/scanners/html.rb | 5 | ||||
-rw-r--r-- | lib/coderay/version.rb | 2 |
3 files changed, 6 insertions, 3 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/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 |