question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can AngleSharp be used to create a diff of/compare of two HTML fragments?

See original GitHub issue

This looks like a great library, that I could potentially use in my Razor Components Testing Library. One of my needs is the ability to intelligently compare to HTML(5) fragments and assert if they are equal. Is that possible with AngleSharp?

Currently I am using XMLUnit for generating the comparison, but since it is XML based it does make certain things harder.

Note: When comparing, I don’t want insignificant whitespace to be counted as an error, also, the order of css classes defined in the class="..." attribute should not matter.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
egilcommented, Oct 8, 2019

@FlorianRappl I do not mind the first option of moving it to the AngleSharp org. That makes good sense and it will likely help with adoption since it will look more sanctioned that way 😃

Let me get the last pieces done that I need for my razor testing lib. That should put the the diffing lib in a very usable state for others in other scenarios, and then we can move it into the AngleSharp org.

1reaction
egilcommented, Oct 8, 2019

For anybody reading this issue, my solution is located at https://github.com/egil/AngleSharp.Diffing

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I prevent AngleSharp from extrapolating a full HTML ...
Is there a way to get AngleSharp to not create a full document, or is there some other way to get my isolated...
Read more >
AngleSharp - Documentation
AngleSharp integrates everything you need to explore and mutate the DOM tree. Node retrieval is straight forward by using powerful CSS query selectors....
Read more >
AngleSharp
The only difference lies in the generated document, which has different semantics and a uses a different DOM. The * point is quite...
Read more >
Imperfections in Crystalline Solids [1 ed.] 1107123135, ...
By mixing two different semiconductors, e.g. GaAs and InAs, thus creating an imperfect crystal, the lattice constant of the crystal can be tuned...
Read more >
AngleSharp 1.0.4
AngleSharp is the ultimate angle brackets parser library. It parses HTML5, CSS3, and XML to construct a DOM based on the official W3C...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found