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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50d045a93d1bcd80cd9013959fac8d671c856e298a4d0834b0b1c97b1c920143
4
- data.tar.gz: 16c0aad8bfdc01e84406ac9fd0201c65851429dc505f5519c23aac20221e5ebb
3
+ metadata.gz: bcbedaaac5248f5ca65457efc285d8b931083379d9459fefd1633d6ba0074e6f
4
+ data.tar.gz: b32ed85a69e42c9ccd57dc2f5c2fd8c3835274b5a07e7629a5766a5fecd0bd97
5
5
  SHA512:
6
- metadata.gz: 402f46556ab43370f244cd6adeb9ddd538d0dbc0a9668fa12ba25cf244b27b561c254ea9fb9173991c464d6d5775766f0d37a742209290cdda742d48bbed1fc7
7
- data.tar.gz: 1c1e45375255e2a13ec0dffd193a06574abe0aff60154256ec0254d0c6b4bee6766404e9de108a4a1b470b75d5338195c9bf1d3505d00e1fee901f3119c6d755
6
+ metadata.gz: 3fab67dd051cbebacdfd8cefd270b1ef4375c9cdec915f5ab06351a4504d2cbbed9970835f794c7c509394d36ceb86410719bed969f3d69ac7001e2a529570cd
7
+ data.tar.gz: febf67a5e7eb49412789f3cfb519f3e2de5daa8e42ac311c99373066cf96041a7d650d24e72337a9ffdca0fdbe1bbd403d204d18a82e143049d78fdcf8ba02e9
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.8.1
6
+
7
+ ### Fixed
8
+
9
+ - Fix issue with diffs between blocks of matches.
10
+
5
11
  ## 0.8.0
6
12
 
7
13
  ### Changed
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- markdiff (0.8.0)
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.14.2-x86_64-linux)
12
+ nokogiri (1.15.4-x86_64-linux)
13
13
  racc (~> 1.4)
14
- racc (1.6.2)
14
+ racc (1.7.1)
15
15
  rake (13.0.6)
16
16
  redcarpet (3.6.0)
17
17
  rspec (3.12.0)
@@ -100,14 +100,17 @@ module Markdiff
100
100
  end
101
101
 
102
102
  # Partial matching
103
- before_node.children.each do |before_child|
104
- if identity_map[before_child]
105
- next
106
- end
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?
@@ -1,3 +1,3 @@
1
1
  module Markdiff
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
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-03-09 00:00:00.000000000 Z
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: []