Skip to content

Commit 308fd38

Browse files
committed
Merge branch 'master' into lua-scanner
2 parents b081c1f + 8c8f5a6 commit 308fd38

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

Changes.textile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release
77
h2. Next Version
88

99
* add @:string/:char@, remove @:regexp/:function@ color from Terminal encoder [GH #29, thanks to Kyrylo Silin]
10+
* allow @-@ in line number anchor prefix for HTML encoder [GH #32, thanks to shurizzle]
11+
* Fix HTML scanner: Don't crash if HTML in a diff contains a JavaScript tag.
1012

1113
h2. Changes in 1.0.7
1214

coderay.gemspec

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ Gem::Specification.new do |s|
88
if ENV['RELEASE']
99
s.version = CodeRay::VERSION
1010
else
11-
# thanks to @Argorak for this solution
12-
# revision = 134 + (`git log --oneline | wc -l`.to_i)
13-
# s.version = "#{CodeRay::VERSION}.#{revision}rc1"
14-
s.version = "#{CodeRay::VERSION}.rc2"
11+
s.version = "#{CodeRay::VERSION}.rc#{ENV['RC'] || 1}"
1512
end
1613

1714
s.authors = ['Kornelius Kalnbach']

lib/coderay/scanners/html.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def reset
6969
def setup
7070
@state = :initial
7171
@plain_string_content = nil
72+
@in_tag = nil
7273
end
7374

7475
def scan_java_script encoder, code
@@ -83,7 +84,8 @@ def scan_java_script encoder, code
8384
def scan_tokens encoder, options
8485
state = options[:state] || @state
8586
plain_string_content = @plain_string_content
86-
in_tag = in_attribute = nil
87+
in_tag = @in_tag
88+
in_attribute = nil
8789

8890
encoder.begin_group :string if state == :attribute_value_string
8991

@@ -237,6 +239,7 @@ def scan_tokens encoder, options
237239
if options[:keep_state]
238240
@state = state
239241
@plain_string_content = plain_string_content
242+
@in_tag = in_tag
240243
end
241244

242245
encoder.end_group :string if state == :attribute_value_string

lib/coderay/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module CodeRay
2-
VERSION = '1.0.7'
2+
VERSION = '1.0.8'
33
end

0 commit comments

Comments
 (0)