diff --git a/src/AngleSharp.Diffing.Tests/AngleSharp.DiffingTests.csproj b/src/AngleSharp.Diffing.Tests/AngleSharp.DiffingTests.csproj index ec15b72..e1f8a91 100644 --- a/src/AngleSharp.Diffing.Tests/AngleSharp.DiffingTests.csproj +++ b/src/AngleSharp.Diffing.Tests/AngleSharp.DiffingTests.csproj @@ -10,6 +10,9 @@ + + all diff --git a/src/AngleSharp.Diffing/Strategies/ElementStrategies/CssSelectorElementMatcher.cs b/src/AngleSharp.Diffing/Strategies/ElementStrategies/CssSelectorElementMatcher.cs index a900b62..bdc985f 100644 --- a/src/AngleSharp.Diffing/Strategies/ElementStrategies/CssSelectorElementMatcher.cs +++ b/src/AngleSharp.Diffing/Strategies/ElementStrategies/CssSelectorElementMatcher.cs @@ -43,7 +43,7 @@ private static bool TryGetTestNode(IDiffContext context, string cssSelector, [No testNode = searchResult.Length switch { 0 => null, - 1 => searchResult[0], + 1 => searchResult.First(), _ => throw new DiffMatchSelectorReturnedTooManyResultsException($@"The CSS selector ""{cssSelector}"" returned {searchResult.Length} matches from the test node tree. No more than one is allowed.") };