pretty_diff 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -31,15 +31,15 @@ module PrettyDiff::HtmlGenerator #:nodoc:
31
31
  end
32
32
 
33
33
  def added_line(text)
34
- %Q[<span class="gi">#{text}</span>]
34
+ %Q[<div><span class="gi">#{text}</span></div>]
35
35
  end
36
36
 
37
37
  def deleted_line(text)
38
- %Q[<span class="gd">#{text}</span>]
38
+ %Q[<div><span class="gd">#{text}</span></div>]
39
39
  end
40
40
 
41
41
  def not_modified_line(text)
42
- text
42
+ %Q[<div>#{text}</div>]
43
43
  end
44
44
 
45
45
  def chunk_end
@@ -68,6 +68,11 @@ module PrettyDiff::HtmlGenerator #:nodoc:
68
68
  end
69
69
 
70
70
  def generate_line_numbers(left, right)
71
+ [left, right].each do |column|
72
+ column.map! do |num|
73
+ if num.nil? then '' else %Q{<a href="#">#{num}</a>} end
74
+ end
75
+ end
71
76
  line_numbers_column(left.join("\n")) +
72
77
  line_numbers_column(right.join("\n"))
73
78
  end
data/pretty_diff.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pretty_diff}
8
- s.version = "0.3.1"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ilya Sabanin"]
12
- s.date = %q{2010-01-15}
12
+ s.date = %q{2010-01-20}
13
13
  s.description = %q{PrettyDiff is a highly customizable library for creating fully featured HTML
14
14
  listings out of unified diff format strings.
15
15
  Include copy/paste-safe line numbers and built-in syntax highlighting.}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_diff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Sabanin
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-15 00:00:00 +07:00
12
+ date: 2010-01-20 00:00:00 +07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency