Skip to content

Wrong missing Child Element in HTML Comparison Using Diffing Strategy Pipeline #47

Closed
@starsibi

Description

@starsibi

Discussed in #46

Originally posted by starsibi October 27, 2024
Am I missing something here? I'm facing an issue where the expected output, <div class="child2">child2</div>, is missing in testHTML, but it's actually returning <div class="child3">child3</div>. Could you share your thoughts on this?

Thanks in advance!

var strategy = new DiffingStrategyPipeline();
strategy.AddDefaultOptions();

// Create the differ and pass in the strategy
var differ = new HtmlDiffer(strategy);

// Use the differ to compare markup
var controlHtml = "<div class="parent">\r\n <div class="child1">child1\r\n <div class="child2">child2\r\n <div class="child3">child3\r\n";
var testHtml = "<div class="parent">\r\n <div class="child1">child1\r\n <div class="child3">child3\r\n";
var diffs = differ.Compare(controlHtml, testHtml);
```</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions