Merge branch 'master' into dev

This commit is contained in:
Egil Hansen 2019-12-26 08:51:22 +00:00
Родитель 13963a1c95 4584019c8b
Коммит 15d81d5767
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: ABEA4CD063EB9740
1 изменённых файлов: 5 добавлений и 24 удалений

Просмотреть файл

@ -14,30 +14,11 @@ AngleSharp Diffing makes it possible to compare AngleSharp _control_ nodes and _
The _control_ nodes represents the expected HTML tree, i.e. how the nodes are expected to look, and the _test_ nodes represents the nodes that should be compared to the _control_ nodes.
**Differences:** There are three types off `IDiff` differences, that the library can return.
- `NodeDiff`/`AttrDiff`: Represents a difference between a control and test node or a control and test attribute.
- `MissingNodeDiff`/`MissingAttrDiff`: Represents a difference where a control node or control attribute was expected to exist, but was not found in the test nodes tree.
- `UnexpectedNodeDiff`/`UnexpectedAttrDiff`: Represents a difference where a test node or test attribute was unexpectedly found in the test nodes tree, but did not have a match in the control nodes tree.
# Usage
To find the differences between a control HTML fragment and a test HTML fragment, using the default options, the easiest way is to use the `DiffBuilder` class, like so:
```csharp
var controlHtml = "<p>Hello World</p>";
var testHtml = "<p>World, I say hello</p>";
var diffs = DiffBuilder
.Compare(control)
.WithTest(test)
.Build();
```
Read more about the available options on the [Options](/docs/Options.md) page.
# Documentation
- [Options](/docs/Options.md)
- [Creating custom diffing options](/docs/CustomOptions.md)
- [Difference engine internals](/docs/DiffingEngineInternals.md)
### Documentation:
- [Getting started](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Getting-Started)
- [Diffing options](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Diffing-Options)
- [Creating custom diffing strategies](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Getting-Started)
- [Difference Engine Internals](https://github.com/AngleSharp/AngleSharp.Diffing/wiki/Difference-Engine-Internals)
## Acknowledgments
- [Florian Rappl](https://github.com/FlorianRappl) from the AngleSharp team for providing ideas, input and sample code for working with AngleSharp.