AngleSharp / AngleSharp.Diffing

A library that makes it possible to compare two AngleSharp node lists and get a list of differences between them.
MIT License
37 stars 6 forks source link

Fix textnode path #21

Closed edxlhornung closed 2 years ago

edxlhornung commented 2 years ago

Types of Changes

Prerequisites

Please make sure you can check the following two boxes:

Contribution Type

What types of changes does your code introduce? Put an x in all the boxes that apply:

Description

Please see #20 as it contains a good description of the problem and the implementation I did.

The issue was that the index of nodes without children (text and comment) present in the path property of diff nodes was incorrect. This is due to Core.ComparisonSource.GetPathIndex() returning the index inside the Children property (Which does not show nodes without children) instead of the ChildNodes property.

Thus I changed Core.ComparisonSource.GetPathIndex() to return the index inside ChildNodes. I also had to adjust the corresponding test cases in order to accommodate this new change.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.

egil commented 2 years ago

@FlorianRappl seems like the build script needs a little TLC.

egil commented 2 years ago

Im sorry for the lack of feedback on this. I will try to look at this during the weekend and get back to you @edxlhornung.

FlorianRappl commented 2 years ago

Sorry missed out on it - currently quite a lot of things to do...

edxlhornung commented 2 years ago

No worries! I also had a lot to do so I haven't continued my current projet with the library. I'll probably resume working on it on Monday.

egil commented 2 years ago

Hi and sorry again, travel came in-between of this. Should have time in the beginning of the next week.

egil commented 2 years ago

@FlorianRappl is the build error also an issue in the other AngleSharp repos? I dont have experience with Cake, but a quick google suggests this: https://github.com/cake-build/cake/issues/2262

FlorianRappl commented 2 years ago

@egil just look at AngleSharp.Core and follow the steps there.

AFAIK right now the build is working. If FileHelpers is the issue you can have a look at e.g. AngleSharp.Css.

egil commented 2 years ago

@edxlhornung I think you need to rebase your branch on devel and then the build pipeline should run. I managed to pin the cake addin package versions to something works, so if you do a rebase, we should be able to test your changes.

FlorianRappl commented 2 years ago

You're the man @egil ! Thanks a lot for your efforts here