-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # CHANGELOG.md # src/AngleSharp.Diffing.Tests/Core/HtmlDifferenceEngineTest.cs # src/AngleSharp.Diffing/Core/AttributeComparison.cs # src/AngleSharp.Diffing/Core/AttributeComparisonSource.cs # src/AngleSharp.Diffing/Core/CompareDecision.cs # src/AngleSharp.Diffing/Core/CompareResult.cs # src/AngleSharp.Diffing/Core/Comparison.cs # src/AngleSharp.Diffing/Core/ComparisonSource.cs # src/AngleSharp.Diffing/Core/HtmlDifferenceEngine.cs # src/AngleSharp.Diffing/Strategies/AttributeStrategies/OrderingStyleAttributeComparer.cs # src/AngleSharp.Diffing/Strategies/AttributeStrategies/StyleAttributeComparer.cs # src/Directory.Build.props
- Loading branch information
Showing
43 changed files
with
271 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage("Usage", "CA2201:Do not raise reserved exception types", Justification = "Not relevant in tests.")] | ||
[assembly: SuppressMessage("Design", "CA1034:Nested types should not be visible", Justification = "Not relevant in tests")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,44 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<Description>Provides a complete diffing model of HTML.</Description> | ||
<Product>AngleSharp.Diffing</Product> | ||
<Authors>AngleSharp</Authors> | ||
<PackageId>AngleSharp.Diffing</PackageId> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://anglesharp.github.io</PackageProjectUrl> | ||
<PackageIcon>logo.png</PackageIcon> | ||
<PackageIconUrl>https://raw.github.com/AngleSharp/AngleSharp.Diffing/master/logo.png</PackageIconUrl> | ||
<PackageTags>html html5 css css3 dom library diffing anglesharp diff difference compare comparison testing</PackageTags> | ||
<Copyright>Egil Hansen</Copyright> | ||
<RepositoryUrl>https://github.com/AngleSharp/AngleSharp.Diffing</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Description>Provides a complete diffing model of HTML.</Description> | ||
<Product>AngleSharp.Diffing</Product> | ||
<Authors>AngleSharp</Authors> | ||
<PackageId>AngleSharp.Diffing</PackageId> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageProjectUrl>https://anglesharp.github.io</PackageProjectUrl> | ||
<PackageIcon>logo.png</PackageIcon> | ||
<PackageIconUrl>https://raw.github.com/AngleSharp/AngleSharp.Diffing/master/logo.png</PackageIconUrl> | ||
<PackageTags>html html5 css css3 dom library diffing anglesharp diff difference compare comparison testing</PackageTags> | ||
<Copyright>Egil Hansen</Copyright> | ||
<RepositoryUrl>https://github.com/AngleSharp/AngleSharp.Diffing</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<NoWarn>$(NoWarn);NU5104</NoWarn> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> | ||
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[5.0.0]" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Meziantou.Analyzer" Version="2.0.169"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="TunnelVisionLabs.ReferenceAssemblyAnnotator" Version="1.0.0-alpha.160" PrivateAssets="all" /> | ||
<PackageDownload Include="Microsoft.NETCore.App.Ref" Version="[5.0.0]" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<None Include="..\..\logo.png" Pack="true" PackagePath="\" /> | ||
<None Include="..\..\LICENSE" Pack="true" PackagePath="\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="..\..\logo.png" Pack="true" PackagePath="\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
using System.Runtime.InteropServices; | ||
|
||
namespace AngleSharp.Diffing.Core; | ||
|
||
/// <summary> | ||
/// A match between two attributes that should be compared. | ||
/// </summary> | ||
/// <param name="Control">Gets the control attribute which the <see cref="Test"/> attribute is supposed to match.</param> | ||
/// <param name="Test">Gets the test attribute which should be compared to the <see cref="Control"/> attribute.</param> | ||
[StructLayout(LayoutKind.Auto)] | ||
public readonly record struct AttributeComparison(in AttributeComparisonSource Control, in AttributeComparisonSource Test) | ||
{ | ||
/// <summary> | ||
/// Returns the control and test elements which the control and test attributes belongs to. | ||
/// </summary> | ||
public (IElement ControlElement, IElement TestElement) GetAttributeElements() | ||
public readonly (IElement ControlElement, IElement TestElement) AttributeElements | ||
=> ((IElement)Control.ElementSource.Node, (IElement)Test.ElementSource.Node); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.