canon 0.3.28 → 0.3.29
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 +4 -4
- data/docs/INDEX.adoc +1 -1
- data/docs/advanced/diff-classification.adoc +1 -1
- data/docs/advanced/extending-canon.adoc +1 -1
- data/docs/advanced/index.adoc +6 -6
- data/docs/advanced/verbose-mode-architecture.adoc +1 -1
- data/docs/features/configuration-profiles.adoc +4 -4
- data/docs/features/diff-formatting/algorithm-specific-output.adoc +5 -5
- data/docs/features/diff-formatting/colors-and-symbols.adoc +4 -4
- data/docs/features/diff-formatting/comment-asymmetry.adoc +3 -3
- data/docs/features/diff-formatting/display-filtering.adoc +4 -4
- data/docs/features/diff-formatting/display-preprocessing.adoc +7 -7
- data/docs/features/diff-formatting/index.adoc +16 -16
- data/docs/features/diff-formatting/pretty-diff-mode.adoc +4 -4
- data/docs/features/diff-formatting/themes.adoc +2 -2
- data/docs/features/diff-formatting/whitespace-adjacency.adoc +3 -3
- data/docs/features/environment-configuration/index.adoc +8 -8
- data/docs/features/environment-configuration/override-system.adoc +5 -5
- data/docs/features/environment-configuration/size-limits.adoc +4 -4
- data/docs/features/index.adoc +1 -1
- data/docs/features/match-options/algorithm-specific-behavior.adoc +5 -5
- data/docs/features/match-options/html-policies.adoc +1 -1
- data/docs/features/match-options/index.adoc +7 -7
- data/docs/features/match-options/pretty-printed-fixtures.adoc +4 -4
- data/docs/guides/choosing-configuration.adoc +6 -6
- data/docs/interfaces/rspec/index.adoc +1 -1
- data/docs/interfaces/ruby-api/index.adoc +1 -1
- data/docs/internals/diffnode-enrichment.adoc +1 -1
- data/docs/internals/index.adoc +4 -4
- data/docs/reference/cli-options.adoc +4 -4
- data/docs/reference/environment-variables.adoc +1 -1
- data/docs/understanding/algorithms/dom-diff.adoc +9 -9
- data/docs/understanding/algorithms/index.adoc +11 -11
- data/docs/understanding/algorithms/semantic-tree-diff.adoc +7 -7
- data/docs/understanding/architecture.adoc +9 -9
- data/docs/understanding/comparison-pipeline.adoc +7 -7
- data/docs/understanding/formats/html.adoc +5 -5
- data/docs/understanding/formats/index.adoc +5 -5
- data/docs/understanding/formats/json.adoc +5 -5
- data/docs/understanding/formats/xml.adoc +4 -4
- data/docs/understanding/formats/yaml.adoc +5 -5
- data/lib/canon/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ff4b9d6b5a57176d2d382f7b0d730047161920dfb4cb4004b58d60bba9c0edab
|
|
4
|
+
data.tar.gz: ed8dfddca4d957fbc3fbb1e62dbd1b03032c661e82c06513304d2abcf4e288cc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 778faacee321541b7d8ceef7c3497969080243acd01fc01bde3902deb68b7664e5ed966a230fc969766cfb32aefe76c81be9d7ae8a86d6b0f0ea870a6ed32cf1
|
|
7
|
+
data.tar.gz: a3a42291c8100b20362c273c34778abdb4f22eec057c616e54daa60b77e4272c9fe5742fa352874ffc1145c0800e89f6c00800d8938bfcf2af364cff9c71ba9f
|
data/docs/INDEX.adoc
CHANGED
|
@@ -140,4 +140,4 @@ See link:contributing[Contributing to Documentation]
|
|
|
140
140
|
* Configuration profiles with element-level whitespace classification
|
|
141
141
|
* Three-way whitespace sensitivity: strict, normalize, insensitive
|
|
142
142
|
|
|
143
|
-
See link:https://github.com/lutaml/canon/
|
|
143
|
+
See link:https://github.com/lutaml/canon/releases[Full Changelog]
|
|
@@ -279,7 +279,7 @@ direction relative to the partner content: `before`, `after`, or
|
|
|
279
279
|
re-alignment walk encounters an asymmetric whitespace node
|
|
280
280
|
* **Report-only** — does not change equivalence outcomes compared to
|
|
281
281
|
pre-#137 behaviour; only changes the diff-report shape (see
|
|
282
|
-
link
|
|
282
|
+
link:../../features/diff-formatting/whitespace-adjacency/[Whitespace
|
|
283
283
|
adjacency] for details)
|
|
284
284
|
|
|
285
285
|
.Example: Comment handling
|
|
@@ -188,6 +188,6 @@ See the source code for examples of:
|
|
|
188
188
|
|
|
189
189
|
== See Also
|
|
190
190
|
|
|
191
|
-
* link
|
|
191
|
+
* link:../../understanding/architecture/[Architecture] - 4-layer architecture overview
|
|
192
192
|
* link:../features/diff-formatting/[Diff Formatting] - Layer 4 rendering options
|
|
193
193
|
* link:diff-pipeline[Comparison Pipeline] - Technical pipeline details
|
data/docs/advanced/index.adoc
CHANGED
|
@@ -19,10 +19,10 @@ This section provides detailed technical information about Canon's internal algo
|
|
|
19
19
|
|
|
20
20
|
== What You'll Learn
|
|
21
21
|
|
|
22
|
-
link
|
|
22
|
+
link:../understanding/algorithms/dom-diff/[**DOM Diff**]::
|
|
23
23
|
Deep dive into Canon's default DOM diff algorithm: position-based matching, operation detection, and diff generation.
|
|
24
24
|
|
|
25
|
-
link
|
|
25
|
+
link:../understanding/algorithms/semantic-tree-diff/[**Semantic Tree Diff**]::
|
|
26
26
|
How the experimental semantic tree diff works: signature calculation, similarity matching, and operation classification.
|
|
27
27
|
|
|
28
28
|
link:verbose-mode-architecture[**Verbose Mode Architecture**]::
|
|
@@ -57,7 +57,7 @@ The DOM diff algorithm is Canon's stable, well-tested comparison strategy.
|
|
|
57
57
|
* Performance is critical
|
|
58
58
|
* Stable, predictable behavior required
|
|
59
59
|
|
|
60
|
-
See link
|
|
60
|
+
See link:../understanding/algorithms/dom-diff/[DOM Diff] for implementation details.
|
|
61
61
|
|
|
62
62
|
=== Semantic Tree Diff Algorithm
|
|
63
63
|
|
|
@@ -77,7 +77,7 @@ The semantic tree diff is an experimental algorithm that understands document st
|
|
|
77
77
|
* Operation-based analysis desired
|
|
78
78
|
* Willing to accept experimental status
|
|
79
79
|
|
|
80
|
-
See link
|
|
80
|
+
See link:../understanding/algorithms/semantic-tree-diff/[Semantic Tree Diff Internals] for implementation details.
|
|
81
81
|
|
|
82
82
|
== Architecture Patterns
|
|
83
83
|
|
|
@@ -203,8 +203,8 @@ result = Canon::Comparison.compare(doc1, doc2,
|
|
|
203
203
|
|
|
204
204
|
== Next Steps
|
|
205
205
|
|
|
206
|
-
* Read link
|
|
207
|
-
* Explore link
|
|
206
|
+
* Read link:../understanding/algorithms/dom-diff/[DOM Diff] to understand the default algorithm
|
|
207
|
+
* Explore link:../understanding/algorithms/semantic-tree-diff/[Semantic Tree Diff] for advanced matching
|
|
208
208
|
* Check link:extending-canon[Extending Canon] to add custom functionality
|
|
209
209
|
|
|
210
210
|
== See Also
|
|
@@ -498,6 +498,6 @@ This ensures the correct output order and separation of concerns.
|
|
|
498
498
|
== See also
|
|
499
499
|
|
|
500
500
|
* link:../features/diff-formatting/[Diff Formatting] - Diff output customization
|
|
501
|
-
* link
|
|
501
|
+
* link:../../understanding/comparison-pipeline/[Comparison Pipeline] - 4-layer architecture
|
|
502
502
|
* link:../interfaces/rspec/[RSpec Matchers] - Using verbose mode in tests
|
|
503
503
|
* link:../interfaces/cli/[CLI] - Command-line verbose mode
|
|
@@ -280,11 +280,11 @@ Profile YAML keys map directly to Canon configuration accessors:
|
|
|
280
280
|
|===
|
|
281
281
|
|
|
282
282
|
All `DiffConfig` and `MatchConfig` attributes documented in
|
|
283
|
-
link
|
|
283
|
+
link:../../reference/options-across-interfaces/[Options Across Interfaces]
|
|
284
284
|
are supported.
|
|
285
285
|
|
|
286
286
|
== See also
|
|
287
287
|
|
|
288
|
-
* link
|
|
289
|
-
* link
|
|
290
|
-
* link
|
|
288
|
+
* link:../environment-configuration/override-system/[Override System] -- ENV variable priority
|
|
289
|
+
* link:../match-options/[Match Options] -- match profile presets (`:strict`, `:spec_friendly`, etc.)
|
|
290
|
+
* link:../../guides/choosing-configuration/[Choosing Configuration] -- decision guide
|
|
@@ -525,9 +525,9 @@ result = Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
525
525
|
|
|
526
526
|
== See Also
|
|
527
527
|
|
|
528
|
-
* link
|
|
529
|
-
* link
|
|
530
|
-
* link
|
|
528
|
+
* link:../[Diff Formatting Overview]
|
|
529
|
+
* link:../diff-formatting/[Diff modes] - by_line vs by_object details
|
|
530
|
+
* link:../../match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How algorithms work
|
|
531
531
|
* link:../../understanding/algorithms/[Algorithms] - Detailed algorithm documentation
|
|
532
|
-
* link
|
|
533
|
-
* link
|
|
532
|
+
* link:../colors-and-symbols/[Colors and Symbols] - Visual formatting options
|
|
533
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
@@ -480,7 +480,7 @@ Canon supports multiple color themes that adapt the diff display to your termina
|
|
|
480
480
|
* `:retro` -- Amber CRT, low blue light, accessibility
|
|
481
481
|
* `:claude` -- Claude Code diff style with red/green backgrounds
|
|
482
482
|
|
|
483
|
-
See link
|
|
483
|
+
See link:../themes/[Diff display themes] for full theme documentation.
|
|
484
484
|
|
|
485
485
|
=== Automatic Color Detection
|
|
486
486
|
|
|
@@ -727,9 +727,9 @@ The combination ensures diffs are readable even without color perception.
|
|
|
727
727
|
|
|
728
728
|
== Related Features
|
|
729
729
|
|
|
730
|
-
* link
|
|
731
|
-
* link
|
|
732
|
-
* link
|
|
730
|
+
* link:../display-filtering/[Display Filtering] - Control which diff types to show
|
|
731
|
+
* link:../context-and-grouping/[Context and Grouping] - Control surrounding context
|
|
732
|
+
* link:../../match-options/[Match Options] - Configure what's considered normative vs informative
|
|
733
733
|
|
|
734
734
|
== See Also
|
|
735
735
|
|
|
@@ -88,7 +88,7 @@ DIFFERENCE #1 — comments: Comment present on EXPECTED only:
|
|
|
88
88
|
== Combined with whitespace asymmetry
|
|
89
89
|
|
|
90
90
|
The same realignment walk handles asymmetric whitespace-only text
|
|
91
|
-
nodes (link
|
|
91
|
+
nodes (link:../whitespace-adjacency/[issue #137]) and asymmetric
|
|
92
92
|
comment nodes together. When a children mismatch is fully explained by
|
|
93
93
|
a combination of asymmetric whitespace and asymmetric comments, the
|
|
94
94
|
walker emits one diff per asymmetric node with the appropriate
|
|
@@ -147,9 +147,9 @@ Both comparison paths delegate to `ChildRealignment.walk`:
|
|
|
147
147
|
|
|
148
148
|
== Related
|
|
149
149
|
|
|
150
|
-
* link
|
|
150
|
+
* link:../whitespace-adjacency/[Whitespace adjacency] — sibling
|
|
151
151
|
contract for asymmetric whitespace-only text nodes.
|
|
152
|
-
* link
|
|
152
|
+
* link:../../../advanced/diff-classification/[Diff classification] —
|
|
153
153
|
Normative vs informative differences.
|
|
154
154
|
|
|
155
155
|
== History
|
|
@@ -507,10 +507,10 @@ puts result.differences.count # Number of informative diffs
|
|
|
507
507
|
|
|
508
508
|
== See also
|
|
509
509
|
|
|
510
|
-
* link
|
|
511
|
-
* link
|
|
510
|
+
* link:../../match-options/[Match options] - Configure match dimensions
|
|
511
|
+
* link:../colors-and-symbols/[Colors and symbols] - Understanding diff
|
|
512
512
|
visualization
|
|
513
|
-
* link:../../../understanding/algorithms/
|
|
513
|
+
* link:../../../understanding/algorithms/[Diff algorithms] -
|
|
514
514
|
Algorithm-specific behavior
|
|
515
|
-
* link:../../../advanced/diff-classification
|
|
515
|
+
* link:../../../advanced/diff-classification/[Diff classification] -
|
|
516
516
|
Normative vs informative classification
|
|
@@ -11,7 +11,7 @@ nav_order: 6
|
|
|
11
11
|
|
|
12
12
|
Display preprocessing controls how documents are normalized *before the
|
|
13
13
|
line-by-line diff is rendered*. It is entirely separate from
|
|
14
|
-
link:../../
|
|
14
|
+
link:../../match-options/[comparison preprocessing]
|
|
15
15
|
(`FormatConfig#preprocessing`), which controls normalization for equivalence
|
|
16
16
|
detection.
|
|
17
17
|
|
|
@@ -588,7 +588,7 @@ solve an asymmetric formatting problem: fixture files are typically
|
|
|
588
588
|
hand-indented heredocs, while received XML is compact.
|
|
589
589
|
|
|
590
590
|
For the full rationale, algorithm, and examples see the dedicated guide:
|
|
591
|
-
link
|
|
591
|
+
link:../../match-options/pretty-printed-fixtures/[Pretty-printed fixture support].
|
|
592
592
|
|
|
593
593
|
=== Quick reference
|
|
594
594
|
|
|
@@ -644,13 +644,13 @@ described in <<_controlling_whitespace_visualization_with_element_classification
|
|
|
644
644
|
|
|
645
645
|
== See also
|
|
646
646
|
|
|
647
|
-
* link
|
|
647
|
+
* link:../character-visualization/[Character visualization] — how special
|
|
648
648
|
characters are rendered in diff output
|
|
649
|
-
* link
|
|
649
|
+
* link:../../match-options/pretty-printed-fixtures/[Pretty-printed fixture support]
|
|
650
650
|
— full rationale, algorithm, and walkthrough examples
|
|
651
|
-
* link
|
|
651
|
+
* link:../../../reference/options-across-interfaces/[Options across interfaces]
|
|
652
652
|
— Layer 1b display preprocessing table
|
|
653
|
-
* link
|
|
653
|
+
* link:../../../reference/environment-variables/[Environment variables] —
|
|
654
654
|
`CANON_DISPLAY_PREPROCESSING` etc.
|
|
655
|
-
* link
|
|
655
|
+
* link:../../match-options/[Match options] — comparison preprocessing
|
|
656
656
|
(`cfg.xml.preprocessing`)
|
|
@@ -32,7 +32,7 @@ Canon's diff formatting includes:
|
|
|
32
32
|
themselves instead of cascading into mismatches against neighbouring
|
|
33
33
|
content. The Reason line names the direction relative to the partner
|
|
34
34
|
(`before`/`after`/`adjacent to`)
|
|
35
|
-
(link
|
|
35
|
+
(link:whitespace-adjacency/[details])
|
|
36
36
|
|
|
37
37
|
== Available formatting options
|
|
38
38
|
|
|
@@ -45,7 +45,7 @@ determination.
|
|
|
45
45
|
* Show only normative differences (affect equivalence)
|
|
46
46
|
* Show only informative differences (don't affect equivalence)
|
|
47
47
|
|
|
48
|
-
See link:display-filtering
|
|
48
|
+
See link:display-filtering/[Display filtering] for complete details.
|
|
49
49
|
|
|
50
50
|
=== Colors and symbols
|
|
51
51
|
|
|
@@ -56,7 +56,7 @@ Canon uses color-coded output to distinguish different types of changes:
|
|
|
56
56
|
* Yellow: Normative structural changes
|
|
57
57
|
* Cyan: Informative differences
|
|
58
58
|
|
|
59
|
-
See link:colors-and-symbols
|
|
59
|
+
See link:colors-and-symbols/[Colors and symbols] for details.
|
|
60
60
|
|
|
61
61
|
=== Diff display themes
|
|
62
62
|
|
|
@@ -67,7 +67,7 @@ Choose from 4 predefined color themes (light, dark, retro, claude) or create cus
|
|
|
67
67
|
* Retro theme: Amber CRT, low blue light
|
|
68
68
|
* Claude theme: Maximum contrast with colored backgrounds
|
|
69
69
|
|
|
70
|
-
See link:themes
|
|
70
|
+
See link:themes/[Themes] for complete theme documentation.
|
|
71
71
|
|
|
72
72
|
=== Character visualization
|
|
73
73
|
|
|
@@ -90,7 +90,7 @@ Canon::Config.configure do |cfg|
|
|
|
90
90
|
end
|
|
91
91
|
----
|
|
92
92
|
|
|
93
|
-
See link:character-visualization
|
|
93
|
+
See link:character-visualization/[Character visualization] for details.
|
|
94
94
|
|
|
95
95
|
=== Context and grouping
|
|
96
96
|
|
|
@@ -99,7 +99,7 @@ Control how much surrounding context to show:
|
|
|
99
99
|
* Context lines: Number of unchanged lines around changes
|
|
100
100
|
* Grouping: Combine nearby changes into single blocks
|
|
101
101
|
|
|
102
|
-
See link:context-and-grouping
|
|
102
|
+
See link:context-and-grouping/[Context and grouping] for details.
|
|
103
103
|
|
|
104
104
|
=== Display preprocessing
|
|
105
105
|
|
|
@@ -111,7 +111,7 @@ algorithm:
|
|
|
111
111
|
* `:pretty_print` — run through `Canon::PrettyPrinter::Xml` (one tag per line)
|
|
112
112
|
* `:c14n` — run through XML C14N normalization
|
|
113
113
|
|
|
114
|
-
See link:display-preprocessing
|
|
114
|
+
See link:display-preprocessing/[Display preprocessing] for details,
|
|
115
115
|
including the character-visualization constraint for future extensibility.
|
|
116
116
|
|
|
117
117
|
=== Pretty-diff mode
|
|
@@ -133,7 +133,7 @@ formatter = Canon::DiffFormatter.new(
|
|
|
133
133
|
)
|
|
134
134
|
----
|
|
135
135
|
|
|
136
|
-
See link:pretty-diff-mode
|
|
136
|
+
See link:pretty-diff-mode/[Pretty-diff mode] for details and limitations.
|
|
137
137
|
|
|
138
138
|
=== Algorithm-specific output
|
|
139
139
|
|
|
@@ -142,7 +142,7 @@ Different diff algorithms produce different output styles:
|
|
|
142
142
|
* DOM diff: Line-by-line or by-object output
|
|
143
143
|
* Semantic tree diff: Operation-based output with tree structure
|
|
144
144
|
|
|
145
|
-
See link:algorithm-specific-output
|
|
145
|
+
See link:algorithm-specific-output/[Algorithm-specific output] for details.
|
|
146
146
|
|
|
147
147
|
== Common use cases
|
|
148
148
|
|
|
@@ -189,16 +189,16 @@ Diff formatting can be configured:
|
|
|
189
189
|
* Per-format (XML, HTML, JSON, YAML)
|
|
190
190
|
* Per-operation via method parameters
|
|
191
191
|
|
|
192
|
-
See link:../../reference/cli-options
|
|
193
|
-
link:../../interfaces/ruby-api/
|
|
192
|
+
See link:../../reference/cli-options/[CLI options] and
|
|
193
|
+
link:../../interfaces/ruby-api/[Ruby API] for configuration details.
|
|
194
194
|
|
|
195
195
|
== See also
|
|
196
196
|
|
|
197
|
-
* link:../../understanding/comparison-pipeline
|
|
197
|
+
* link:../../understanding/comparison-pipeline/[Comparison pipeline] -
|
|
198
198
|
Understanding the diff generation process
|
|
199
|
-
* link:../match-options/
|
|
199
|
+
* link:../match-options/[Match options] - Controlling what gets
|
|
200
200
|
compared
|
|
201
|
-
* link:../../advanced/diff-classification
|
|
201
|
+
* link:../../advanced/diff-classification/[Diff classification] -
|
|
202
202
|
Normative vs informative differences
|
|
203
|
-
* link:../../interfaces/cli/
|
|
204
|
-
* link:../../interfaces/ruby-api/
|
|
203
|
+
* link:../../interfaces/cli/[CLI interface] - Command-line usage
|
|
204
|
+
* link:../../interfaces/ruby-api/[Ruby API] - Programmatic usage
|
|
@@ -94,7 +94,7 @@ For preformatted elements where every whitespace character is significant, use
|
|
|
94
94
|
`preserve_whitespace_elements` instead (e.g. `%w[pre code]`).
|
|
95
95
|
|
|
96
96
|
See
|
|
97
|
-
link
|
|
97
|
+
link:../display-preprocessing/#_controlling_whitespace_visualization_with_element_classification[display-preprocessing:
|
|
98
98
|
element classification] for the full three-way classification system and HTML
|
|
99
99
|
format defaults.
|
|
100
100
|
|
|
@@ -146,9 +146,9 @@ to avoid resolving against `Canon::Diff` which is an unrelated internal module.
|
|
|
146
146
|
|
|
147
147
|
== See also
|
|
148
148
|
|
|
149
|
-
* link
|
|
149
|
+
* link:../display-preprocessing/[Display preprocessing] — normalising input
|
|
150
150
|
before the diff
|
|
151
|
-
* link
|
|
151
|
+
* link:../context-and-grouping/[Context and grouping] — context_lines and
|
|
152
152
|
diff grouping
|
|
153
|
-
* link
|
|
153
|
+
* link:../display-filtering/[Display filtering] — normative/informative
|
|
154
154
|
filtering (`:by_line` only)
|
|
@@ -347,7 +347,7 @@ Colors `:bright_black` and `:bright_white` are not supported by Rainbow in 16-co
|
|
|
347
347
|
|
|
348
348
|
== See also
|
|
349
349
|
|
|
350
|
-
* link
|
|
351
|
-
* link
|
|
350
|
+
* link:../colors-and-symbols/[Colors and symbols] - Diff markers and classification
|
|
351
|
+
* link:../display-filtering/[Display filtering] - Control which diff types appear
|
|
352
352
|
* link:../environment-configuration/index.html[Environment configuration] - ENV variable setup
|
|
353
353
|
* link:../../reference/environment-variables.html[Environment variables reference] - Complete variable listing
|
|
@@ -110,7 +110,7 @@ information. In that case Canon falls back to naming the parent
|
|
|
110
110
|
element instead — `Whitespace inside <PARENT>` — and the
|
|
111
111
|
Expected/Actual detail block renders each side's parent element
|
|
112
112
|
compactly per the contract from
|
|
113
|
-
link
|
|
113
|
+
link:../../../advanced/semantic-diff-report/#parent-context-fallback-for-ambiguous-text-diffs[issue #112].
|
|
114
114
|
|
|
115
115
|
NOTE: An earlier wording (`Whitespace surrounding "X"`) classified the
|
|
116
116
|
*whitespace node's position among its own siblings* rather than its
|
|
@@ -212,9 +212,9 @@ whitespace node as a single normative `:whitespace_adjacency` diff.
|
|
|
212
212
|
|
|
213
213
|
== Related
|
|
214
214
|
|
|
215
|
-
* link
|
|
215
|
+
* link:../../../advanced/diff-classification/[Diff classification] —
|
|
216
216
|
Normative vs informative differences.
|
|
217
|
-
* link
|
|
217
|
+
* link:../../match-options/[Match options] — Configuring
|
|
218
218
|
`preserve_whitespace_elements`, `collapse_whitespace_elements`, and
|
|
219
219
|
`strip_whitespace_elements`.
|
|
220
220
|
|
|
@@ -120,7 +120,7 @@ export CANON_DIFF_THEME=claude
|
|
|
120
120
|
|
|
121
121
|
Valid values: `light`, `dark`, `retro`, `claude`
|
|
122
122
|
|
|
123
|
-
See link:../diff-formatting/themes
|
|
123
|
+
See link:../diff-formatting/themes/[Diff display themes] for complete theme documentation.
|
|
124
124
|
|
|
125
125
|
=== Context and grouping
|
|
126
126
|
|
|
@@ -162,7 +162,7 @@ Valid values: `true`, `false`, `1`, `0`, `yes`, `no`
|
|
|
162
162
|
|
|
163
163
|
Canon provides configurable size limits to prevent hangs or excessive resource usage when processing very large files.
|
|
164
164
|
|
|
165
|
-
See link:size-limits
|
|
165
|
+
See link:size-limits/[Size Limits] for detailed configuration.
|
|
166
166
|
|
|
167
167
|
Key variables:
|
|
168
168
|
|
|
@@ -172,7 +172,7 @@ Key variables:
|
|
|
172
172
|
|
|
173
173
|
== Override system
|
|
174
174
|
|
|
175
|
-
See link:override-system
|
|
175
|
+
See link:override-system/[Override System] for how environment variables interact with programmatic configuration.
|
|
176
176
|
|
|
177
177
|
== Usage across interfaces
|
|
178
178
|
|
|
@@ -307,7 +307,7 @@ export CANON_USE_COLOR=false
|
|
|
307
307
|
|
|
308
308
|
== Complete variable reference
|
|
309
309
|
|
|
310
|
-
See link:../../reference/environment-variables
|
|
310
|
+
See link:../../reference/environment-variables/[Environment Variables Reference] for a complete table of all environment variables.
|
|
311
311
|
|
|
312
312
|
== Troubleshooting
|
|
313
313
|
|
|
@@ -344,7 +344,7 @@ puts "Source of algorithm: #{resolver.source_for(:algorithm)}"
|
|
|
344
344
|
|
|
345
345
|
== See also
|
|
346
346
|
|
|
347
|
-
* link:size-limits
|
|
348
|
-
* link:override-system
|
|
349
|
-
* link:../../reference/environment-variables
|
|
350
|
-
* link:../../reference/options-across-interfaces
|
|
347
|
+
* link:size-limits/[Size Limits] - File size and node count limits
|
|
348
|
+
* link:override-system/[Override System] - How ENV vars override defaults
|
|
349
|
+
* link:../../reference/environment-variables/[Environment Variables Reference] - Complete variable listing
|
|
350
|
+
* link:../../reference/options-across-interfaces/[Options Across Interfaces] - How options map across CLI, Ruby, and RSpec
|
|
@@ -43,7 +43,7 @@ Configuration values are resolved using a strict four-level priority:
|
|
|
43
43
|
|
|
44
44
|
**Rule**: Higher priority always wins, regardless of when values are set.
|
|
45
45
|
|
|
46
|
-
See link
|
|
46
|
+
See link:../../configuration-profiles/[Configuration Profiles] for details on the profile layer.
|
|
47
47
|
|
|
48
48
|
== How overrides work
|
|
49
49
|
|
|
@@ -437,7 +437,7 @@ end
|
|
|
437
437
|
|
|
438
438
|
== See also
|
|
439
439
|
|
|
440
|
-
* link
|
|
441
|
-
* link
|
|
442
|
-
* link
|
|
443
|
-
* link
|
|
440
|
+
* link:../[Environment Configuration] - Overview and usage
|
|
441
|
+
* link:../size-limits/[Size Limits] - Limit-specific ENV variables
|
|
442
|
+
* link:../../../reference/environment-variables/[Environment Variables Reference] - Complete listing
|
|
443
|
+
* link:../../../reference/options-across-interfaces/[Options Across Interfaces] - How options work in CLI, Ruby, RSpec
|
|
@@ -267,7 +267,7 @@ export CANON_VERBOSE_DIFF=false
|
|
|
267
267
|
|
|
268
268
|
== See also
|
|
269
269
|
|
|
270
|
-
* link
|
|
271
|
-
* link
|
|
272
|
-
* link
|
|
273
|
-
* link
|
|
270
|
+
* link:../[Environment Configuration] - Complete ENV configuration
|
|
271
|
+
* link:../override-system/[Override System] - How ENV vars work
|
|
272
|
+
* link:../../../reference/environment-variables/[Environment Variables Reference] - All variables
|
|
273
|
+
* link:../../../understanding/algorithms/dom-diff/[DOM Algorithm] - Faster for large files
|
data/docs/features/index.adoc
CHANGED
|
@@ -79,7 +79,7 @@ Customize how differences are displayed.
|
|
|
79
79
|
|
|
80
80
|
=== Configuration Profiles
|
|
81
81
|
|
|
82
|
-
link:configuration-profiles
|
|
82
|
+
link:configuration-profiles/[**Configuration Profiles**]::
|
|
83
83
|
Bundle all settings into named presets defined in YAML.
|
|
84
84
|
+
|
|
85
85
|
* Built-in profiles (metanorma, metanorma_debug)
|
|
@@ -357,9 +357,9 @@ end
|
|
|
357
357
|
|
|
358
358
|
== See Also
|
|
359
359
|
|
|
360
|
-
* link
|
|
360
|
+
* link:../[Match Options Overview]
|
|
361
361
|
* link:../../understanding/algorithms/[Algorithms] - Detailed algorithm documentation
|
|
362
|
-
* link
|
|
363
|
-
* link
|
|
364
|
-
* link
|
|
365
|
-
* link
|
|
362
|
+
* link:../match-options/[Match dimensions] - All available dimensions
|
|
363
|
+
* link:../match-options/[Match profiles] - Preset configurations
|
|
364
|
+
* link:../../diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - How output differs
|
|
365
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
@@ -314,4 +314,4 @@ See the following files for implementation details:
|
|
|
314
314
|
|
|
315
315
|
* link:index.html[Match Options] - Overview of match system
|
|
316
316
|
* link:algorithm-specific-behavior.html[Algorithm-Specific Behavior] - How algorithms handle options
|
|
317
|
-
* link
|
|
317
|
+
* link:../../../advanced/diff-classification/[Diff Classification] - Normative vs informative
|
|
@@ -12,7 +12,7 @@ has_children: true
|
|
|
12
12
|
|
|
13
13
|
This section provides a complete reference for Canon's match options, including match dimensions, behaviors, and predefined profiles.
|
|
14
14
|
|
|
15
|
-
Match options control **Layer 3 (Match Options)** of Canon's 4-layer comparison architecture. See link:../../understanding/comparison-pipeline
|
|
15
|
+
Match options control **Layer 3 (Match Options)** of Canon's 4-layer comparison architecture. See link:../../understanding/comparison-pipeline/[Comparison Pipeline] for the complete flow.
|
|
16
16
|
|
|
17
17
|
== Overview
|
|
18
18
|
|
|
@@ -22,15 +22,15 @@ Match options control which aspects of documents are compared and how strictly t
|
|
|
22
22
|
* **Dimension behaviors**: How each dimension is compared (`:strict`, `:normalize`, `:ignore`)
|
|
23
23
|
* **Match profiles**: Predefined combinations for common scenarios
|
|
24
24
|
|
|
25
|
-
**Important**: Match options behave differently with each algorithm. See link:algorithm-specific-behavior
|
|
25
|
+
**Important**: Match options behave differently with each algorithm. See link:algorithm-specific-behavior/[Algorithm-Specific Behavior] for details.
|
|
26
26
|
|
|
27
27
|
== Child Pages
|
|
28
28
|
|
|
29
|
-
* link
|
|
30
|
-
* link
|
|
31
|
-
* link:algorithm-specific-behavior
|
|
32
|
-
* link:html-policies
|
|
33
|
-
* link:pretty-printed-fixtures
|
|
29
|
+
* link:../match-options/[Match dimensions] - Detailed reference for all dimensions
|
|
30
|
+
* link:../match-options/[Match profiles] - Predefined configurations
|
|
31
|
+
* link:algorithm-specific-behavior/[Algorithm-Specific Behavior] - How DOM and Semantic algorithms interpret options differently
|
|
32
|
+
* link:html-policies/[HTML-Specific Policies] - HTML format-specific comparison policies
|
|
33
|
+
* link:pretty-printed-fixtures/[Pretty-Printed Fixture Support] - Comparing compact generated XML against hand-indented fixture heredocs without spurious whitespace differences
|
|
34
34
|
|
|
35
35
|
== Match dimensions overview
|
|
36
36
|
|
|
@@ -261,10 +261,10 @@ new code.
|
|
|
261
261
|
|
|
262
262
|
== See also
|
|
263
263
|
|
|
264
|
-
* link:../../
|
|
264
|
+
* link:../../diff-formatting/display-preprocessing/[Display preprocessing]
|
|
265
265
|
— the `display_preprocessing` option and `XmlNormalized` serializer
|
|
266
|
-
* link
|
|
267
|
-
* link
|
|
266
|
+
* link:../[Match options overview] — whitespace sensitivity classification
|
|
267
|
+
* link:../../../reference/options-across-interfaces/[Options across interfaces]
|
|
268
268
|
— cross-interface reference table
|
|
269
|
-
* link
|
|
269
|
+
* link:../../../reference/environment-variables/[Environment variables]
|
|
270
270
|
— `CANON_XML_DIFF_PRETTY_PRINTED_EXPECTED`, `CANON_XML_DIFF_PRETTY_PRINTED_RECEIVED`
|
|
@@ -216,7 +216,7 @@ Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
216
216
|
)
|
|
217
217
|
----
|
|
218
218
|
|
|
219
|
-
**Remember**: Match options behave differently with each algorithm! See link
|
|
219
|
+
**Remember**: Match options behave differently with each algorithm! See link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior].
|
|
220
220
|
|
|
221
221
|
==== Whitespace Type Sensitivity
|
|
222
222
|
|
|
@@ -709,14 +709,14 @@ Profiles bundle all layers (preprocessing, match profile, diff settings,
|
|
|
709
709
|
whitespace element lists) into a named preset defined in YAML.
|
|
710
710
|
Custom file profiles can inherit from built-in profiles.
|
|
711
711
|
|
|
712
|
-
See link
|
|
712
|
+
See link:../../features/configuration-profiles/[Configuration Profiles] for full documentation.
|
|
713
713
|
|
|
714
714
|
== See Also
|
|
715
715
|
|
|
716
|
-
* link
|
|
717
|
-
* link
|
|
716
|
+
* link:../../features/configuration-profiles/[Configuration Profiles] - Named config presets
|
|
717
|
+
* link:../../understanding/comparison-pipeline/[Comparison Pipeline] - Understanding the 4 layers
|
|
718
718
|
* link:../understanding/algorithms/[Algorithms] - Detailed algorithm documentation
|
|
719
|
-
* link
|
|
720
|
-
* link
|
|
719
|
+
* link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How algorithms differ
|
|
720
|
+
* link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - Output format differences
|
|
721
721
|
* link:../features/match-options/[Match Options] - All matching options
|
|
722
722
|
* link:../features/diff-formatting/[Diff Formatting] - Formatting options
|
|
@@ -428,7 +428,7 @@ IMPORTANT: Display filtering does NOT affect equivalence determination. It
|
|
|
428
428
|
only controls which differences appear in the failure output. Equivalence is
|
|
429
429
|
always based on normative differences only.
|
|
430
430
|
|
|
431
|
-
See link:../../features/diff-formatting/display-filtering
|
|
431
|
+
See link:../../features/diff-formatting/display-filtering/[Display
|
|
432
432
|
filtering] for complete details.
|
|
433
433
|
|
|
434
434
|
== Diff algorithms
|
|
@@ -545,7 +545,7 @@ result = Canon::Comparison.equivalent?(xml1, xml2,
|
|
|
545
545
|
----
|
|
546
546
|
====
|
|
547
547
|
|
|
548
|
-
See link:../../features/diff-formatting/display-filtering
|
|
548
|
+
See link:../../features/diff-formatting/display-filtering/[Display
|
|
549
549
|
filtering] for complete details.
|
|
550
550
|
|
|
551
551
|
=== Format-specific comparators
|
|
@@ -606,7 +606,7 @@ The old API still works for backwards compatibility, but enriched properties pro
|
|
|
606
606
|
|
|
607
607
|
== See also
|
|
608
608
|
|
|
609
|
-
* link
|
|
609
|
+
* link:../../understanding/architecture/[Architecture] - 4-layer architecture overview
|
|
610
610
|
* link:../understanding/algorithms/[Algorithms] - DOM and Semantic algorithm details
|
|
611
611
|
* link:../features/diff-formatting/[Diff Formatting] - Layer 4 rendering options
|
|
612
612
|
* link:diff-char-range-pipeline[DiffCharRange Pipeline] - How enriched DiffNodes are processed into character-level display positions
|
data/docs/internals/index.adoc
CHANGED
|
@@ -71,7 +71,7 @@ Canon separates comparison concerns into four layers:
|
|
|
71
71
|
|
|
72
72
|
Only Layer 2 differs between algorithms, and the enriched DiffNode structure ensures clean communication between layers.
|
|
73
73
|
|
|
74
|
-
See link:../understanding/architecture
|
|
74
|
+
See link:../understanding/architecture/[Architecture] for the complete overview.
|
|
75
75
|
|
|
76
76
|
=== Enriched Metadata Flow
|
|
77
77
|
|
|
@@ -265,7 +265,7 @@ def add_difference(node1, node2, diff1, diff2, dimension, opts, differences)
|
|
|
265
265
|
end
|
|
266
266
|
----
|
|
267
267
|
|
|
268
|
-
See link:../understanding/algorithms/dom-diff
|
|
268
|
+
See link:../understanding/algorithms/dom-diff/[DOM Diff Algorithm] for details.
|
|
269
269
|
|
|
270
270
|
=== Semantic Algorithm
|
|
271
271
|
|
|
@@ -289,11 +289,11 @@ def convert_insert(operation)
|
|
|
289
289
|
end
|
|
290
290
|
----
|
|
291
291
|
|
|
292
|
-
See link:../understanding/algorithms/semantic-tree-diff
|
|
292
|
+
See link:../understanding/algorithms/semantic-tree-diff/[Semantic Tree Diff Algorithm] for details.
|
|
293
293
|
|
|
294
294
|
== See Also
|
|
295
295
|
|
|
296
|
-
* link:../understanding/architecture
|
|
296
|
+
* link:../understanding/architecture/[Architecture] - 4-layer architecture overview
|
|
297
297
|
* link:../understanding/algorithms/[Algorithms] - DOM and Semantic algorithm details
|
|
298
298
|
* link:../features/diff-formatting/[Diff Formatting] - Layer 4 rendering options
|
|
299
299
|
* link:../advanced/[Advanced Topics] - Deep technical documentation
|
|
@@ -11,9 +11,9 @@ nav_order: 1
|
|
|
11
11
|
|
|
12
12
|
This page provides a complete reference for all Canon command-line interface options organized by command and function.
|
|
13
13
|
|
|
14
|
-
For conceptual understanding, see link
|
|
14
|
+
For conceptual understanding, see link:../../understanding/comparison-pipeline/[Comparison Pipeline].
|
|
15
15
|
|
|
16
|
-
For choosing the right configuration, see link
|
|
16
|
+
For choosing the right configuration, see link:../../guides/choosing-configuration/[Choosing Configuration].
|
|
17
17
|
|
|
18
18
|
== Command syntax
|
|
19
19
|
|
|
@@ -413,8 +413,8 @@ canon diff page1.html page2.html \
|
|
|
413
413
|
|
|
414
414
|
== See also
|
|
415
415
|
|
|
416
|
-
* link
|
|
417
|
-
* link
|
|
416
|
+
* link:../../understanding/comparison-pipeline/[Comparison Pipeline] - 4-layer architecture
|
|
417
|
+
* link:../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
418
418
|
* link:../features/match-options/[Match Options] - Dimension reference
|
|
419
419
|
* link:../features/diff-formatting/[Diff Formatting] - Output customization
|
|
420
420
|
* link:../interfaces/cli/[CLI Interface] - Command-line usage guide
|
|
@@ -128,7 +128,7 @@ export CANON_JSON_FORMAT_PREPROCESSING=normalize
|
|
|
128
128
|
|`CANON_XML_DIFF_PRETTY_PRINTED_EXPECTED`
|
|
129
129
|
|boolean
|
|
130
130
|
|`false`
|
|
131
|
-
|When `true`, whitespace-only text nodes that start with `"\n"` inside `:collapse`-classified elements are dropped from the **expected (fixture)** document before it reaches the line diff. Solves the asymmetric case where the expected side is a hand-indented heredoc fixture but the received side is compact programmatic XML. Only applies when `display_preprocessing: :normalize_pretty_print`. Format-specific; no global form. See also link
|
|
131
|
+
|When `true`, whitespace-only text nodes that start with `"\n"` inside `:collapse`-classified elements are dropped from the **expected (fixture)** document before it reaches the line diff. Solves the asymmetric case where the expected side is a hand-indented heredoc fixture but the received side is compact programmatic XML. Only applies when `display_preprocessing: :normalize_pretty_print`. Format-specific; no global form. See also link:../../features/match-options/pretty-printed-fixtures/[Pretty-printed fixture support].
|
|
132
132
|
|XML (display only)
|
|
133
133
|
|
|
134
134
|
|`CANON_XML_DIFF_PRETTY_PRINTED_RECEIVED`
|
|
@@ -174,7 +174,7 @@ Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
174
174
|
)
|
|
175
175
|
----
|
|
176
176
|
|
|
177
|
-
See link
|
|
177
|
+
See link:../../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] for how DOM interprets match options.
|
|
178
178
|
|
|
179
179
|
=== With Diff Formatting
|
|
180
180
|
|
|
@@ -289,7 +289,7 @@ The DOM algorithm cannot detect when content moves to a different position:
|
|
|
289
289
|
|
|
290
290
|
**Limitation**: Reordered content shows as DELETE + INSERT pairs
|
|
291
291
|
|
|
292
|
-
**Workaround**: Use link
|
|
292
|
+
**Workaround**: Use link:../semantic-tree-diff/[Semantic Algorithm] for move detection
|
|
293
293
|
|
|
294
294
|
=== Position-Dependent
|
|
295
295
|
|
|
@@ -297,7 +297,7 @@ The algorithm assumes similar structure between documents:
|
|
|
297
297
|
|
|
298
298
|
**Limitation**: Heavily restructured documents produce noisy diffs
|
|
299
299
|
|
|
300
|
-
**Workaround**: Use link
|
|
300
|
+
**Workaround**: Use link:../semantic-tree-diff/[Semantic Algorithm] for restructured documents
|
|
301
301
|
|
|
302
302
|
== Common Use Cases
|
|
303
303
|
|
|
@@ -381,9 +381,9 @@ Canon::Comparison.equivalent?(html1, html2,
|
|
|
381
381
|
|
|
382
382
|
== See Also
|
|
383
383
|
|
|
384
|
-
* link
|
|
385
|
-
* link
|
|
386
|
-
* link
|
|
387
|
-
* link
|
|
388
|
-
* link
|
|
389
|
-
* link
|
|
384
|
+
* link:../[Algorithms Overview] - Comparison of DOM vs Semantic
|
|
385
|
+
* link:../semantic-tree-diff/[Semantic Algorithm] - Alternative algorithm
|
|
386
|
+
* link:../../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How DOM interprets options
|
|
387
|
+
* link:../../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - Output format details
|
|
388
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Complete decision guide
|
|
389
|
+
* link:../dom-diff/[DOM Diff] - Implementation details
|
|
@@ -12,7 +12,7 @@ has_children: true
|
|
|
12
12
|
|
|
13
13
|
Canon provides two comparison algorithms, each with different strengths and use cases. This section explains how to choose between them and what to expect from each.
|
|
14
14
|
|
|
15
|
-
This corresponds to **Layer 2 (Algorithm Selection)** in Canon's 4-layer architecture. See link:../comparison-pipeline
|
|
15
|
+
This corresponds to **Layer 2 (Algorithm Selection)** in Canon's 4-layer architecture. See link:../comparison-pipeline/[Comparison Pipeline] for the complete flow.
|
|
16
16
|
|
|
17
17
|
== Overview
|
|
18
18
|
|
|
@@ -21,12 +21,12 @@ Canon supports two algorithms for document comparison:
|
|
|
21
21
|
* **DOM Algorithm** - Fast, stable, positional comparison (default)
|
|
22
22
|
* **Semantic Algorithm** - Slower, intelligent, detects moves and restructuring (experimental)
|
|
23
23
|
|
|
24
|
-
**Critical**: The algorithm choice affects how Layers 3 and 4 behave. See link:../../features/match-options/algorithm-specific-behavior
|
|
24
|
+
**Critical**: The algorithm choice affects how Layers 3 and 4 behave. See link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] and link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output].
|
|
25
25
|
|
|
26
26
|
== Child Pages
|
|
27
27
|
|
|
28
|
-
* link:dom-diff
|
|
29
|
-
* link:semantic-tree-diff
|
|
28
|
+
* link:dom-diff/[DOM Algorithm] - Positional comparison details
|
|
29
|
+
* link:semantic-tree-diff/[Semantic Algorithm] - Tree-based comparison details
|
|
30
30
|
|
|
31
31
|
== Algorithm Comparison
|
|
32
32
|
|
|
@@ -249,7 +249,7 @@ NOTE: These are approximate times. Actual performance depends on document struct
|
|
|
249
249
|
3. Performance slower but more intelligent
|
|
250
250
|
4. Output format changes to operation-based
|
|
251
251
|
|
|
252
|
-
See link:../../features/match-options/algorithm-specific-behavior
|
|
252
|
+
See link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] for migration details.
|
|
253
253
|
|
|
254
254
|
=== Switching from Semantic to DOM
|
|
255
255
|
|
|
@@ -306,9 +306,9 @@ end
|
|
|
306
306
|
|
|
307
307
|
== See also
|
|
308
308
|
|
|
309
|
-
* link:dom-diff
|
|
310
|
-
* link:semantic-tree-diff
|
|
311
|
-
* link:../comparison-pipeline
|
|
312
|
-
* link:../../features/match-options/algorithm-specific-behavior
|
|
313
|
-
* link:../../features/diff-formatting/algorithm-specific-output
|
|
314
|
-
* link:../../guides/choosing-configuration
|
|
309
|
+
* link:dom-diff/[DOM Algorithm] - Detailed DOM algorithm documentation
|
|
310
|
+
* link:semantic-tree-diff/[Semantic Algorithm] - Detailed semantic algorithm documentation
|
|
311
|
+
* link:../comparison-pipeline/[Comparison Pipeline] - 4-layer architecture
|
|
312
|
+
* link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How algorithms interpret options
|
|
313
|
+
* link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - Output format differences
|
|
314
|
+
* link:../../guides/choosing-configuration/[Choosing Configuration] - Complete decision guide
|
|
@@ -230,7 +230,7 @@ Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
230
230
|
)
|
|
231
231
|
----
|
|
232
232
|
|
|
233
|
-
See link
|
|
233
|
+
See link:../../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] for details.
|
|
234
234
|
|
|
235
235
|
=== With Diff Formatting
|
|
236
236
|
|
|
@@ -525,9 +525,9 @@ When switching from DOM to Semantic:
|
|
|
525
525
|
|
|
526
526
|
== See Also
|
|
527
527
|
|
|
528
|
-
* link
|
|
529
|
-
* link
|
|
530
|
-
* link
|
|
531
|
-
* link
|
|
532
|
-
* link
|
|
533
|
-
* link
|
|
528
|
+
* link:../[Algorithms Overview] - Comparison of DOM vs Semantic
|
|
529
|
+
* link:../dom-diff/[DOM Algorithm] - Standard algorithm
|
|
530
|
+
* link:../../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How Semantic interprets options
|
|
531
|
+
* link:../../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - Output format details
|
|
532
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Complete decision guide
|
|
533
|
+
* link:../semantic-tree-diff/[Semantic Tree Diff] - Advanced details
|
|
@@ -11,9 +11,9 @@ nav_order: 1
|
|
|
11
11
|
|
|
12
12
|
This document explains Canon's 4-layer comparison architecture and how documents flow through preprocessing, algorithm selection, semantic matching, and diff rendering.
|
|
13
13
|
|
|
14
|
-
For a guided walkthrough of choosing configurations, see link
|
|
14
|
+
For a guided walkthrough of choosing configurations, see link:../../guides/choosing-configuration/[Choosing Configuration].
|
|
15
15
|
|
|
16
|
-
For detailed 4-layer pipeline documentation, see link
|
|
16
|
+
For detailed 4-layer pipeline documentation, see link:../comparison-pipeline/[Comparison Pipeline].
|
|
17
17
|
|
|
18
18
|
== Overview
|
|
19
19
|
|
|
@@ -799,7 +799,7 @@ Control how differences are displayed. **This layer is algorithm-specific** - ea
|
|
|
799
799
|
* **DOM algorithm**: Generates line-based differences
|
|
800
800
|
* **Semantic algorithm**: Generates operation-based differences (INSERT, DELETE, UPDATE, MOVE)
|
|
801
801
|
|
|
802
|
-
See link
|
|
802
|
+
See link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] for detailed comparison.
|
|
803
803
|
|
|
804
804
|
=== Diff options
|
|
805
805
|
|
|
@@ -865,7 +865,7 @@ result = Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
865
865
|
)
|
|
866
866
|
----
|
|
867
867
|
|
|
868
|
-
See link
|
|
868
|
+
See link:../comparison-pipeline/[Comparison Pipeline] for layer-by-layer examples.
|
|
869
869
|
|
|
870
870
|
=== DiffNode: Representation of differences
|
|
871
871
|
|
|
@@ -1153,16 +1153,16 @@ This refactoring improves:
|
|
|
1153
1153
|
|
|
1154
1154
|
== See also
|
|
1155
1155
|
|
|
1156
|
-
* link
|
|
1156
|
+
* link:../comparison-pipeline/[Comparison Pipeline] - Complete 4-layer walkthrough
|
|
1157
1157
|
* link:algorithms/[Algorithms] - DOM and Semantic algorithm details
|
|
1158
1158
|
* link:../internals/[Internals] - Implementation details and data structures
|
|
1159
|
-
* link
|
|
1159
|
+
* link:../../internals/diffnode-enrichment/[DiffNode Enrichment] - How metadata flows from Layer 2 to Layer 4
|
|
1160
1160
|
* link:../features/preprocessing/[Preprocessing options]
|
|
1161
1161
|
* link:../features/match-options/[Match dimensions and profiles]
|
|
1162
|
-
* link
|
|
1162
|
+
* link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior]
|
|
1163
1163
|
* link:../features/diff-formatting/[Diff formatting]
|
|
1164
|
-
* link
|
|
1165
|
-
* link
|
|
1164
|
+
* link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output]
|
|
1165
|
+
* link:../../guides/choosing-configuration/[Choosing Configuration]
|
|
1166
1166
|
* link:../interfaces/ruby-api/[Ruby API documentation]
|
|
1167
1167
|
* link:../interfaces/cli/[Command-line interface]
|
|
1168
1168
|
* link:../interfaces/rspec/[RSpec matchers]
|
|
@@ -67,7 +67,7 @@ graph TD
|
|
|
67
67
|
* Match profiles (preset combinations)
|
|
68
68
|
* Algorithm-specific behaviors
|
|
69
69
|
|
|
70
|
-
**Documentation**: See link:../features/match-options/[Match Options] and link
|
|
70
|
+
**Documentation**: See link:../features/match-options/[Match Options] and link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior]
|
|
71
71
|
|
|
72
72
|
=== Layer 4: Diff Formatting
|
|
73
73
|
|
|
@@ -81,7 +81,7 @@ graph TD
|
|
|
81
81
|
* Context and grouping
|
|
82
82
|
* Character visualization
|
|
83
83
|
|
|
84
|
-
**Documentation**: See link:../features/diff-formatting/[Diff Formatting] and link
|
|
84
|
+
**Documentation**: See link:../features/diff-formatting/[Diff Formatting] and link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output]
|
|
85
85
|
|
|
86
86
|
== DiffNode Data Flow
|
|
87
87
|
|
|
@@ -154,7 +154,7 @@ After creation, DiffNodes are enriched with metadata for Layer 4 rendering:
|
|
|
154
154
|
* **NodeSerializer**: Library-agnostic serialization of node content
|
|
155
155
|
* **Attribute extraction**: Normalized attribute hashes
|
|
156
156
|
|
|
157
|
-
See link
|
|
157
|
+
See link:../../internals/diffnode-enrichment/[DiffNode Enrichment] for implementation details.
|
|
158
158
|
|
|
159
159
|
=== Layer 3: Classification
|
|
160
160
|
|
|
@@ -432,8 +432,8 @@ Canon::Comparison.equivalent?(doc1, doc2,
|
|
|
432
432
|
|
|
433
433
|
== See Also
|
|
434
434
|
|
|
435
|
-
* link
|
|
435
|
+
* link:../architecture/[Architecture] - Overall system design
|
|
436
436
|
* link:algorithms/[Algorithms] - Detailed algorithm documentation
|
|
437
|
-
* link
|
|
438
|
-
* link
|
|
439
|
-
* link
|
|
437
|
+
* link:../../features/match-options/algorithm-specific-behavior/[Algorithm-Specific Behavior] - How algorithms interpret match options
|
|
438
|
+
* link:../../features/diff-formatting/algorithm-specific-output/[Algorithm-Specific Output] - Different output formats
|
|
439
|
+
* link:../../guides/choosing-configuration/[Choosing Configuration] - Decision guide for all layers
|
|
@@ -396,9 +396,9 @@ XHTML is treated as XML and follows stricter rules.
|
|
|
396
396
|
|
|
397
397
|
== See also
|
|
398
398
|
|
|
399
|
-
* link
|
|
399
|
+
* link:../../comparison-pipeline/[Comparison Pipeline] - Understanding the 4 layers
|
|
400
400
|
* link:../../features/match-options/[Match Options] - All matching options
|
|
401
|
-
* link
|
|
402
|
-
* link
|
|
403
|
-
* link
|
|
404
|
-
* link
|
|
401
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
402
|
+
* link:../[Format Support] - Overview of all formats
|
|
403
|
+
* link:../xml/[XML Format] - XML-specific features
|
|
404
|
+
* link:../json/[JSON Format] - JSON-specific features
|
|
@@ -20,10 +20,10 @@ Canon provides unified canonicalization and comparison for four serialization fo
|
|
|
20
20
|
|
|
21
21
|
This page provides an overview of format support. See the child pages for format-specific details:
|
|
22
22
|
|
|
23
|
-
* link:xml
|
|
24
|
-
* link:html
|
|
25
|
-
* link:json
|
|
26
|
-
* link:yaml
|
|
23
|
+
* link:xml/[XML Format] - W3C C14N, namespace handling
|
|
24
|
+
* link:html/[HTML Format] - HTML4/5 detection, rendering behavior
|
|
25
|
+
* link:json/[JSON Format] - Sorted keys, type preservation
|
|
26
|
+
* link:yaml/[YAML Format] - YAML specifics, anchors and aliases
|
|
27
27
|
|
|
28
28
|
== Format detection
|
|
29
29
|
|
|
@@ -257,5 +257,5 @@ Canon::Comparison::YamlComparator.equivalent?(yaml1, yaml2,
|
|
|
257
257
|
* link:../../interfaces/ruby-api/[Ruby API documentation]
|
|
258
258
|
* link:../../interfaces/cli/[Command-line interface]
|
|
259
259
|
* link:../../features/match-options/[Match options reference]
|
|
260
|
-
* link:../comparison-pipeline
|
|
260
|
+
* link:../comparison-pipeline/[Comparison Pipeline]
|
|
261
261
|
* link:../../features/preprocessing/[Preprocessing options]
|
|
@@ -382,9 +382,9 @@ Canon normalizes Unicode escapes during canonicalization.
|
|
|
382
382
|
|
|
383
383
|
== See also
|
|
384
384
|
|
|
385
|
-
* link
|
|
385
|
+
* link:../../comparison-pipeline/[Comparison Pipeline] - Understanding the 4 layers
|
|
386
386
|
* link:../../features/match-options/[Match Options] - All matching options
|
|
387
|
-
* link
|
|
388
|
-
* link
|
|
389
|
-
* link
|
|
390
|
-
* link
|
|
387
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
388
|
+
* link:../[Format Support] - Overview of all formats
|
|
389
|
+
* link:../yaml/[YAML Format] - YAML-specific features (similar to JSON)
|
|
390
|
+
* link:../xml/[XML Format] - XML-specific features
|
|
@@ -439,8 +439,8 @@ canon diff expected.xml actual.xml \
|
|
|
439
439
|
|
|
440
440
|
== See also
|
|
441
441
|
|
|
442
|
-
* link
|
|
442
|
+
* link:../../comparison-pipeline/[Comparison Pipeline] - Understanding the 4 layers
|
|
443
443
|
* link:../../features/match-options/[Match Options] - All matching options
|
|
444
|
-
* link
|
|
445
|
-
* link
|
|
446
|
-
* link
|
|
444
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
445
|
+
* link:../[Format Support] - Overview of all formats
|
|
446
|
+
* link:../html/[HTML Format] - HTML-specific features
|
|
@@ -496,9 +496,9 @@ YAML is sensitive to indentation. Use `structural_whitespace: :ignore` to handle
|
|
|
496
496
|
|
|
497
497
|
== See also
|
|
498
498
|
|
|
499
|
-
* link
|
|
499
|
+
* link:../../comparison-pipeline/[Comparison Pipeline] - Understanding the 4 layers
|
|
500
500
|
* link:../../features/match-options/[Match Options] - All matching options
|
|
501
|
-
* link
|
|
502
|
-
* link
|
|
503
|
-
* link
|
|
504
|
-
* link
|
|
501
|
+
* link:../../../guides/choosing-configuration/[Choosing Configuration] - Decision guide
|
|
502
|
+
* link:../[Format Support] - Overview of all formats
|
|
503
|
+
* link:../json/[JSON Format] - JSON-specific features (similar to YAML)
|
|
504
|
+
* link:../xml/[XML Format] - XML-specific features
|
data/lib/canon/version.rb
CHANGED
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.
|
|
4
|
+
version: 0.3.29
|
|
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-09-
|
|
11
|
+
date: 2026-09-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: diff-lcs
|