Skip to content

Commit 0d16d87

Browse files
committed
fix: updated list of boolean attributes
1 parent 32218fd commit 0d16d87

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 0.18.3
22

33
- Enabled using `diff:ignoreAttributes` and `diff:ignoreChildren` together on the same element.
4+
- Corrected list of attributes that is considered as boolean attributes. Removed `hidden`, added `inert`, `playsinline`, `shadowrootclonable`, `shadowrootdelegatesfocus`, and `shadowrootserializable`.
45

56
# 0.18.2
67

src/AngleSharp.Diffing/Strategies/AttributeStrategies/BooleanAttributeComparer.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/// </summary>
66
public class BooleanAttributeComparer
77
{
8-
private static readonly HashSet<string> BooleanAttributesSet = new HashSet<string>()
8+
private static readonly HashSet<string> BooleanAttributesSet = new(StringComparer.OrdinalIgnoreCase)
99
{
1010
"allowfullscreen",
1111
"allowpaymentrequest",
@@ -18,7 +18,7 @@ public class BooleanAttributeComparer
1818
"defer",
1919
"disabled",
2020
"formnovalidate",
21-
"hidden",
21+
"inert",
2222
"ismap",
2323
"itemscope",
2424
"loop",
@@ -27,10 +27,14 @@ public class BooleanAttributeComparer
2727
"nomodule",
2828
"novalidate",
2929
"open",
30+
"playsinline",
3031
"readonly",
3132
"required",
3233
"reversed",
3334
"selected",
35+
"shadowrootclonable",
36+
"shadowrootdelegatesfocus",
37+
"shadowrootserializable",
3438
"typemustmatch"
3539
};
3640

0 commit comments

Comments
 (0)