canon 0.3.96 → 0.3.98

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: e0212ea1d52b51ac82ae495b50d48cc60d0893cb781acc239acbcf857fa7fad1
4
- data.tar.gz: e3562bfbcd1fbafbb4b1653959c8b7791acbabb63d0571771d6aa9fbf7a96148
3
+ metadata.gz: 07c9d8c96426b670ad088e3b96e662b45283c4868e99c27a5afb5a6ecb537780
4
+ data.tar.gz: 5e8bc5ee7aa5b1e1b75b158d1afc68f3035e1c58bcd3da4624fdebbbbc83b4a6
5
5
  SHA512:
6
- metadata.gz: 0d6001bc104553ec9ade604b300b9caa9dda15be5e270e3c6730c75b954d1e244f79c0805332f5c72ef195443656e28b8287b803ebc16c30f75e10bd4cdf3ade
7
- data.tar.gz: 55a286fd6ea09134a2d408e488a2ae5699f193ebb37f1f26a1d0201eee4c6781854442063461c4d54bc4e84fe9dc4952bd2c2a6c634f5927266e41f82cbffb46
6
+ metadata.gz: 813b81bd8fe090e71c9729d18326e864b0af54129e422ae4d624676ed8e191f6b2b278e5dab5e00c1827fccaed9658e5bd85a9ef6ac908c9e0cc4ff97d33839e
7
+ data.tar.gz: 6819b9252b0e6f27efec816241b1444d1ff92456562996ddc0c89a8f07b04eb41d48302025fda8776581437fb793da24db3ed21fec2b1589522c0680739bd99c
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "set"
4
- Canon::NokogiriLoader.require!("HTML comparison")
5
4
 
6
5
  module Canon
7
6
  module Comparison
@@ -383,6 +382,18 @@ module Canon
383
382
  node
384
383
  end
385
384
 
385
+ # Direct comparator calls parse through the legacy XML-fragment
386
+ # lane: both sides of a comparison must land on the SAME tree
387
+ # shape, and a string paired with a user-supplied Nokogiri node
388
+ # must take the Nokogiri path. The pipeline preparse converts
389
+ # string PAIRS through the engine lane (HtmlParser.parse), so
390
+ # user-facing comparisons run engine-served either way.
391
+ # NOTE: the engine fragment parse currently drops comments
392
+ # that follow ignored <html>/<body> start tags (filed
393
+ # upstream — moxml#389) — the pipeline lane's comment
394
+ # handling for strict comments rides that fix.
395
+ Canon::NokogiriLoader.require!("the HTML comparison legacy lane")
396
+
386
397
  frag = Html::NokogiriSupport.xml_fragment(
387
398
  decode_html_named_entities(html_string),
388
399
  )
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- Canon::NokogiriLoader.require!("HTML comparison")
4
-
5
3
  module Canon
6
4
  module Comparison
7
5
  # HTML parsing service with version detection and fragment support
@@ -39,6 +37,11 @@ module Canon
39
37
 
40
38
  return engine_fragment(content) if engine_html_fragments?
41
39
 
40
+ # Nokogiri fallback lane (runtimes without the engine HTML
41
+ # surface): Nokogiri is required lazily, at use — the engine
42
+ # lane above keeps HTML comparison nokogiri-less.
43
+ Canon::NokogiriLoader.require!("the HTML fallback lane")
44
+
42
45
  begin
43
46
  case format
44
47
  when :html5
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.96"
4
+ VERSION = "0.3.98"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: canon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.96
4
+ version: 0.3.98
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-10-17 00:00:00.000000000 Z
11
+ date: 2026-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diff-lcs
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.9.367
47
+ version: 1.9.368
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.9.367
54
+ version: 1.9.368
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: moxml
57
57
  requirement: !ruby/object:Gem::Requirement