markdiff 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/markdiff/differ.rb +6 -1
- data/lib/markdiff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d579e119bf15ea1d6629b7b6fb1f17d2fa2406a0
|
4
|
+
data.tar.gz: 35fa6ffd2804f296fe768b12f3ad550bd2551f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612cfea493d82b55cd8ddb35e7284584cf72b96fbc2b7603d9ef0c183653ad019d5183b6c69dd7463d4b741d27cba46f22318d7593b3664a95983afa7401d402
|
7
|
+
data.tar.gz: f7fc3e3dc5aad82b271d31d145f4674904e5e2d3da34d6b34e99ec3cab0103d30f584e2cfa99b62fe6808815df906962defe49d7c000f18bdf8c06049a0f3103
|
data/CHANGELOG.md
CHANGED
data/lib/markdiff/differ.rb
CHANGED
@@ -202,7 +202,12 @@ module Markdiff
|
|
202
202
|
# @param [Nokogiri::XML::Node] node
|
203
203
|
def mark_top_level_node_as_changed(node)
|
204
204
|
node = node.parent until node.parent.nil? || node.parent.fragment?
|
205
|
-
node["class"]
|
205
|
+
unless node.parent.nil? || node["class"] == "changed"
|
206
|
+
div = Nokogiri::XML::Node.new("div", node.document)
|
207
|
+
div["class"] = "changed"
|
208
|
+
node.replace(div)
|
209
|
+
div.children = node
|
210
|
+
end
|
206
211
|
end
|
207
212
|
end
|
208
213
|
end
|
data/lib/markdiff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdiff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|