summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2012-10-07 03:14:23 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2012-10-07 03:14:23 +0200
commit308fd388b4646ff77263f05634547c6f3cc3e895 (patch)
treeff3e2ebd1dbd81d6770dd187c4a09537274d1057
parentb081c1f3ab670301199005c04ecbc11614593285 (diff)
parent8c8f5a6b64211e1480edbab1eeb9f7bb76d60ecc (diff)
downloadcoderay-308fd388b4646ff77263f05634547c6f3cc3e895.tar.gz
Merge branch 'master' into lua-scanner
-rw-r--r--Changes.textile2
-rw-r--r--coderay.gemspec5
-rw-r--r--lib/coderay/scanners/html.rb5
-rw-r--r--lib/coderay/version.rb2
4 files changed, 8 insertions, 6 deletions
diff --git a/Changes.textile b/Changes.textile
index d70c303..42af2c8 100644
--- a/Changes.textile
+++ b/Changes.textile
@@ -7,6 +7,8 @@ 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
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']
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