markdiff 0.6.0 → 0.6.1
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 +2 -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: ce88d6225031a80172e2478e25ac5bbb0e4767ac
|
4
|
+
data.tar.gz: dc7cc2269616091e0176d613b5cb81dd08e33fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfd8ad92cbb696650cb72539f8e63a1bbe31d4b5198097ad12f0ab2e93ab28bb1836fb154c81096c1f2fd116c0f416b40b27ac09b304cf247650e41282897292
|
7
|
+
data.tar.gz: 9bf8a6ce503b9729bf8e52374ad71edc4f9f92e22f5fabaf1770c1202f271d1eba022403276a2a11d4ede7410cc67f8bf78e1f36272aee675acdbb2798195c50
|
data/CHANGELOG.md
CHANGED
data/lib/markdiff/differ.rb
CHANGED
@@ -14,7 +14,8 @@ module Markdiff
|
|
14
14
|
# @param [Nokogiri::XML::Node] node
|
15
15
|
# @return [Nokogiri::XML::Node] Converted node
|
16
16
|
def apply_patch(operations, node)
|
17
|
-
|
17
|
+
i = 0
|
18
|
+
operations.sort_by {|operation| i += 1; [-operation.priority, i] }.each do |operation|
|
18
19
|
case operation
|
19
20
|
when ::Markdiff::Operations::AddChildOperation
|
20
21
|
operation.target_node.add_child(operation.inserted_node)
|
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.6.
|
4
|
+
version: 0.6.1
|
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-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|