From f5bb55cc14cc17bc4665347fe6c2e11145101624 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 7 Oct 2012 02:59:02 +0200 Subject: Fix HTML scanner: Don't crash if HTML in a diff contains a JavaScript tag. --- Changes.textile | 1 + lib/coderay/scanners/html.rb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changes.textile b/Changes.textile index d70c303..3326a71 100644 --- a/Changes.textile +++ b/Changes.textile @@ -7,6 +7,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release h2. Next Version * add @:string/:char@, remove @:regexp/:function@ color from Terminal encoder [GH #29, thanks to Kyrylo Silin] +* Fix HTML scanner: Don't crash if HTML in a diff contains a JavaScript tag. h2. Changes in 1.0.7 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 -- cgit v1.2.1 From 0ab69bf775106de1954a54a492d0df778f1d15ad Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 7 Oct 2012 02:59:14 +0200 Subject: update changelog --- Changes.textile | 1 + 1 file changed, 1 insertion(+) diff --git a/Changes.textile b/Changes.textile index 3326a71..42af2c8 100644 --- a/Changes.textile +++ b/Changes.textile @@ -7,6 +7,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release h2. Next Version * add @:string/:char@, remove @:regexp/:function@ color from Terminal encoder [GH #29, thanks to Kyrylo Silin] +* allow @-@ in line number anchor prefix for HTML encoder [GH #32, thanks to shurizzle] * Fix HTML scanner: Don't crash if HTML in a diff contains a JavaScript tag. h2. Changes in 1.0.7 -- cgit v1.2.1 From f3dcecb9b875a816aa10b3e24aee25aa7347fd58 Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 7 Oct 2012 03:11:15 +0200 Subject: bump version to 1.0.8 --- lib/coderay/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1 From 8c8f5a6b64211e1480edbab1eeb9f7bb76d60ecc Mon Sep 17 00:00:00 2001 From: Kornelius Kalnbach Date: Sun, 7 Oct 2012 03:13:54 +0200 Subject: cleaning up RC release script --- coderay.gemspec | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/coderay.gemspec b/coderay.gemspec index 1f88318..e686035 100644 --- a/coderay.gemspec +++ b/coderay.gemspec @@ -8,10 +8,7 @@ Gem::Specification.new do |s| if ENV['RELEASE'] s.version = CodeRay::VERSION else - # thanks to @Argorak for this solution - # revision = 134 + (`git log --oneline | wc -l`.to_i) - # s.version = "#{CodeRay::VERSION}.#{revision}rc1" - s.version = "#{CodeRay::VERSION}.rc2" + s.version = "#{CodeRay::VERSION}.rc#{ENV['RC'] || 1}" end s.authors = ['Kornelius Kalnbach'] -- cgit v1.2.1