markdiff 0.5.5 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e80f72a11886759cdc06f7808979e6ed0bad625a
4
- data.tar.gz: 9cd7dc00d2f40c38a6a09f424da0719f57f00451
3
+ metadata.gz: f2346464a728f27b53d6e41867c54f6fc98be7b3
4
+ data.tar.gz: 39a6911a132f9fdf92d55fe0de403148670c14af
5
5
  SHA512:
6
- metadata.gz: bbcaaf7b68319e07798a1706b86acc4b7fc583e073c5c40e8cc41ef93ada23075d7053ba96019b03d2caeb02f146c01f508e3bdf236281cae8623607ecf6a4b2
7
- data.tar.gz: fa5d376beedea28a30d8420174611841dde14e93ded018bd1ab90f26cae73f7d977bf084a5a2037e70d3616a04cde47fc7f1e86b4a1438951309840e8535e2c8
6
+ metadata.gz: d2ee80ab7bedc30ff0eff09a4cff8115fb7200e1433bc5cfb0330a64dafb28a10c351175a3268ee7c7d1115ef19b5df468a51c6837ba135d385ef870e5c27ee7
7
+ data.tar.gz: 5ee096c2d67f82ea0434f9c925a821cdf2458bae9942f5c0c34d141a8460f5bb1292afbf7c5fee89246d9926382627140b50175bf01fa73f5a94fede09be563a
@@ -1,3 +1,6 @@
1
+ ## 0.6.0
2
+ - Add .del class to all del elements
3
+
1
4
  ## 0.5.5
2
5
  - Preserve classes on adding new class (e.g. .added)
3
6
 
@@ -7,10 +7,10 @@ module Markdiff
7
7
  def inserted_node
8
8
  if target_node.name == "li"
9
9
  target_node["class"] = "removed"
10
- target_node.inner_html = "<del>#{target_node.inner_html}</del>"
10
+ target_node.inner_html = %(<del class="del">#{target_node.inner_html}</del>)
11
11
  target_node
12
12
  else
13
- "<del>#{target_node}</del>"
13
+ %(<del class="del">#{target_node}</del>)
14
14
  end
15
15
  end
16
16
 
@@ -18,7 +18,7 @@ module Markdiff
18
18
  ::Diff::LCS.diff(before_elements, after_elements).flatten.each do |operation|
19
19
  type, position, element = *operation
20
20
  if type == "-"
21
- before_elements[position] = "<del>#{element}</del>"
21
+ before_elements[position] = %(<del class="del">#{element}</del>)
22
22
  else
23
23
  before_elements[position] = "#{before_elements[position]}<ins>#{element}</ins>"
24
24
  end
@@ -1,3 +1,3 @@
1
1
  module Markdiff
2
- VERSION = "0.5.5"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura