markdiff 0.8.0 → 0.8.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 +6 -0
- data/Gemfile.lock +3 -3
- data/lib/markdiff/differ.rb +7 -4
- data/lib/markdiff/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcbedaaac5248f5ca65457efc285d8b931083379d9459fefd1633d6ba0074e6f
|
4
|
+
data.tar.gz: b32ed85a69e42c9ccd57dc2f5c2fd8c3835274b5a07e7629a5766a5fecd0bd97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fab67dd051cbebacdfd8cefd270b1ef4375c9cdec915f5ab06351a4504d2cbbed9970835f794c7c509394d36ceb86410719bed969f3d69ac7001e2a529570cd
|
7
|
+
data.tar.gz: febf67a5e7eb49412789f3cfb519f3e2de5daa8e42ac311c99373066cf96041a7d650d24e72337a9ffdca0fdbe1bbd403d204d18a82e143049d78fdcf8ba02e9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
markdiff (0.8.
|
4
|
+
markdiff (0.8.1)
|
5
5
|
diff-lcs
|
6
6
|
nokogiri
|
7
7
|
|
@@ -9,9 +9,9 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
diff-lcs (1.5.0)
|
12
|
-
nokogiri (1.
|
12
|
+
nokogiri (1.15.4-x86_64-linux)
|
13
13
|
racc (~> 1.4)
|
14
|
-
racc (1.
|
14
|
+
racc (1.7.1)
|
15
15
|
rake (13.0.6)
|
16
16
|
redcarpet (3.6.0)
|
17
17
|
rspec (3.12.0)
|
data/lib/markdiff/differ.rb
CHANGED
@@ -100,14 +100,17 @@ module Markdiff
|
|
100
100
|
end
|
101
101
|
|
102
102
|
# Partial matching
|
103
|
-
before_node.children.
|
104
|
-
if identity_map[before_child]
|
105
|
-
|
106
|
-
|
103
|
+
before_node.children.each_with_index do |before_child, index|
|
104
|
+
next if identity_map[before_child]
|
105
|
+
|
106
|
+
next_match = before_node.children[index..].find { |child| identity_map[child] }
|
107
|
+
|
107
108
|
after_node.children.each do |after_child|
|
108
109
|
case
|
109
110
|
when identity_map[before_child]
|
110
111
|
break
|
112
|
+
when next_match && inverted_identity_map[after_child] == next_match
|
113
|
+
break
|
111
114
|
when inverted_identity_map[after_child]
|
112
115
|
when before_child.text?
|
113
116
|
if after_child.text?
|
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.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email:
|
99
99
|
- r7kamura@gmail.com
|
100
100
|
executables: []
|
@@ -127,7 +127,7 @@ homepage: https://github.com/r7kamura/markdiff
|
|
127
127
|
licenses:
|
128
128
|
- MIT
|
129
129
|
metadata: {}
|
130
|
-
post_install_message:
|
130
|
+
post_install_message:
|
131
131
|
rdoc_options: []
|
132
132
|
require_paths:
|
133
133
|
- lib
|
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
143
|
version: '0'
|
144
144
|
requirements: []
|
145
145
|
rubygems_version: 3.3.26
|
146
|
-
signing_key:
|
146
|
+
signing_key:
|
147
147
|
specification_version: 4
|
148
148
|
summary: Rendered Markdown differ.
|
149
149
|
test_files: []
|