Skip to content

Commit 43ad09c

Browse files
committed
Merge branch 'master' into multiline-inline-diff
2 parents 1f88ad0 + 3effca8 commit 43ad09c

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ rvm:
55
- jruby-18mode
66
- jruby-19mode
77
- rbx-18mode
8-
# - rbx-19mode # test again later
9-
# - ruby-head # test again later
10-
# - jruby-head # test again later
8+
- rbx-19mode
9+
# - ruby-head # test again later: RedCloth not compiling
10+
- jruby-head
1111
- ree
1212
branches:
1313
only:
1414
- master
15-
- stable
1615
script: "rake test" # test:scanners"

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

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ gemspec
88
group :development do
99
gem "bundler", ">= 1.0.0"
1010
gem "rake", "~> 0.9.2"
11-
gem "RedCloth", RUBY_PLATFORM == 'java' ? "= 4.2.7" : ">= 4.0.3"
11+
gem "RedCloth", RUBY_PLATFORM == 'java' ? ">= 4.2.7" : ">= 4.0.3"
1212
gem "term-ansicolor"
1313
gem "shoulda-context", "~> 1.0.0" if RUBY_VERSION >= '1.8.7'
1414
gem "json" unless RUBY_VERSION >= '1.9.1'

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/encoders/html/numbering.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def self.number! output, mode = :table, options = {}
1717

1818
anchor_prefix = options[:line_number_anchors]
1919
anchor_prefix = 'line' if anchor_prefix == true
20-
anchor_prefix = anchor_prefix.to_s[/\w+/] if anchor_prefix
20+
anchor_prefix = anchor_prefix.to_s[/[\w-]+/] if anchor_prefix
2121
anchoring =
2222
if anchor_prefix
2323
proc do |line|

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)