canon 0.3.109 → 0.3.110

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebfe19fb1f87ac9ec65e4fc2ba727bbe97b3b8d0f9733184588217e82753e9f9
4
- data.tar.gz: 301b3d96f9ffebce87022cdfef4d538ab512ea6f832bdfd3f2c39c164a996069
3
+ metadata.gz: 831a2d23d844114132e9a234a4e1452f08aacc36ef0947d80c7100358bbbe209
4
+ data.tar.gz: ff423e64f21b9e5e6c93694c124fc404b95e31ad5b4ed3162262c62023bd5c35
5
5
  SHA512:
6
- metadata.gz: cb97c29a9ab623568ac2ea936710a42694b7d4863e0075ee90dce47f3ff01faba53a695e66abde1ce680ef3d53da4e31a7c9b8ed9a6f883dac08d48dc3757c66
7
- data.tar.gz: e4b4a46d00abe224d9bf541cc248220aa984caec768f3d2173be3b00c8471234141ae872dbc6273445b3be6434c8a027ad98e8ffba1045b8a712ee54bf2d8f35
6
+ metadata.gz: 35762c78b2ba5bd8090cb799566ecabec4d863bd956c27c0a9119bf8025cda2bad8d49f9a93b4242ece7bfc5de7e8ef5a939bce5e3f955e46af925857379e704
7
+ data.tar.gz: 4b932b9b03940bc536887cbf4a750ce265b2992afc775b446ea9a56b675d23f52724b7b7a6f710ae3258a4c5e73c69bfc01bd67b56087554ca0a3c47a5f35343
@@ -198,6 +198,12 @@ module Canon
198
198
  )
199
199
  has_mismatch = false
200
200
 
201
+ # The ORIGINAL direction, captured before
202
+ # determine_mismatch_children returns reduced sets of equal
203
+ # length — deriving the side from the reduced sets reports
204
+ # every mid-content removal as an insertion (canon#285).
205
+ before_longer = children1.length > children2.length
206
+
201
207
  # Length check
202
208
  unless children1.length == children2.length
203
209
  has_mismatch = true
@@ -228,7 +234,7 @@ module Canon
228
234
  else
229
235
  mismatched_children.each do |child|
230
236
  child_dim = comparator.determine_node_dimension(child)
231
- if children1.length > children2.length
237
+ if before_longer
232
238
  comparator.add_difference(child, nil,
233
239
  Comparison::MISSING_NODE,
234
240
  Comparison::MISSING_NODE,
data/lib/canon/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Canon
4
- VERSION = "0.3.109"
4
+ VERSION = "0.3.110"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.109
4
+ version: 0.3.110
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.