From 2dda742aa38aeb6a9d2299f35b53543d3f399e74 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 16:56:03 -0400 Subject: [PATCH 1/9] Move implied-name nested control cases out to separate file --- .../implied/implied-name.html | 18 +++----- .../implied/implied-name.json | 38 ---------------- .../nested/nested-implied-name.html | 10 +++++ .../nested/nested-implied-name.json | 44 +++++++++++++++++++ 4 files changed, 60 insertions(+), 50 deletions(-) create mode 100644 tests/microformats-v2-unit/nested/nested-implied-name.html create mode 100644 tests/microformats-v2-unit/nested/nested-implied-name.json diff --git a/tests/microformats-v2-unit/implied/implied-name.html b/tests/microformats-v2-unit/implied/implied-name.html index a7e9df0..a9b0656 100644 --- a/tests/microformats-v2-unit/implied/implied-name.html +++ b/tests/microformats-v2-unit/implied/implied-name.html @@ -5,7 +5,11 @@ trimming is performed. --> - +
Valid
Invalid
@@ -18,17 +22,7 @@
NotPartOfTest
Invalid -
-
-
NotPartOfTest
Invalid -
Invalid -
- -
-
NotPartOfTestNotPartOfTest
Invalid -
- - + Valid  Do Trim diff --git a/tests/microformats-v2-unit/implied/implied-name.json b/tests/microformats-v2-unit/implied/implied-name.json index de49f2a..6cbec9f 100644 --- a/tests/microformats-v2-unit/implied/implied-name.json +++ b/tests/microformats-v2-unit/implied/implied-name.json @@ -33,44 +33,6 @@ ] } }, - { - "type": [ - "h-test-nested" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, - { - "type": [ - "h-test-nested-prop" - ], - "properties": { - "prop": [ - { - "value": "NotPartOfTestNotPartOfTest", - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - } - }, { "type": [ "h-test-img-filled" diff --git a/tests/microformats-v2-unit/nested/nested-implied-name.html b/tests/microformats-v2-unit/nested/nested-implied-name.html new file mode 100644 index 0000000..c56709c --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-name.html @@ -0,0 +1,10 @@ + +
+
+
NotPartOfTest
Invalid +
Invalid +
+ +
+
NotPartOfTestNotPartOfTest
Invalid +
\ No newline at end of file diff --git a/tests/microformats-v2-unit/nested/nested-implied-name.json b/tests/microformats-v2-unit/nested/nested-implied-name.json new file mode 100644 index 0000000..569f4c2 --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-name.json @@ -0,0 +1,44 @@ +{ + "items": [ + { + "type": [ + "h-test-nested" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + }, + { + "type": [ + "h-test-nested-prop" + ], + "properties": { + "prop": [ + { + "value": "NotPartOfTestNotPartOfTest", + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + } + } + ], + "rels": {}, + "rel-urls": {} +} From 7b779189cdfc27927c90a426a35b1f45aa2883fe Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 16:59:47 -0400 Subject: [PATCH 2/9] Remove three cases from implied-photo which are actually testing implied-name --- .../implied/implied-photo.html | 3 -- .../implied/implied-photo.json | 30 ------------------- 2 files changed, 33 deletions(-) diff --git a/tests/microformats-v2-unit/implied/implied-photo.html b/tests/microformats-v2-unit/implied/implied-photo.html index 0b96f34..bfd29ff 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.html +++ b/tests/microformats-v2-unit/implied/implied-photo.html @@ -13,7 +13,6 @@ NameOnly - NameOnly Valid @@ -33,7 +32,6 @@
NameOnly
-
 NameOnly
Valid
@@ -70,7 +68,6 @@
NameOnly
-
 NameOnly
Valid
diff --git a/tests/microformats-v2-unit/implied/implied-photo.json b/tests/microformats-v2-unit/implied/implied-photo.json index e30af3e..adb755b 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.json +++ b/tests/microformats-v2-unit/implied/implied-photo.json @@ -30,16 +30,6 @@ ] } }, - { - "type": [ - "h-test-img-src-missing-alt-filled-space" - ], - "properties": { - "name": [ - "NameOnly" - ] - } - }, { "type": [ "h-test-img-src-empty-alt-missing" @@ -269,16 +259,6 @@ ] } }, - { - "type": [ - "h-test-img-onlychildoftype-src-missing-alt-filled-space" - ], - "properties": { - "name": [ - "NameOnly" - ] - } - }, { "type": [ "h-test-img-onlychildoftype-src-empty-alt-missing" @@ -724,16 +704,6 @@ ] } }, - { - "type": [ - "h-test-img-onlygrandchildoftype-src-missing-alt-filled-space" - ], - "properties": { - "name": [ - "NameOnly" - ] - } - }, { "type": [ "h-test-img-onlygrandchildoftype-src-empty-alt-missing" From 505298fd33e37fa82f70ba170268aae3416a0947 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 17:03:31 -0400 Subject: [PATCH 3/9] Avoid interactions with date normalization when testing property-name matching The Rust parser unfairly fails the test without this change --- .../names/names-properties.html | 32 +++++++++---------- .../names/names-properties.json | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/microformats-v2-unit/names/names-properties.html b/tests/microformats-v2-unit/names/names-properties.html index 376438e..de9b05d 100644 --- a/tests/microformats-v2-unit/names/names-properties.html +++ b/tests/microformats-v2-unit/names/names-properties.html @@ -59,24 +59,24 @@
NotPartOfTest
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
-
2000-01-01 00:00:00+00:00
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
+
2000-01-01 00:00:00+0100
1900-01-01 00:00:00+00:00
1900-01-01 00:00:00+00:00
diff --git a/tests/microformats-v2-unit/names/names-properties.json b/tests/microformats-v2-unit/names/names-properties.json index 6e83570..f29689f 100644 --- a/tests/microformats-v2-unit/names/names-properties.json +++ b/tests/microformats-v2-unit/names/names-properties.json @@ -67,52 +67,52 @@ "NotPartOfTest" ], "t": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "test-three": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "test-test-four": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "test-five-t": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "6-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "7t-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "8t8-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t9-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t10-test-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t11t-test-t": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t12-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t13-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t14-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t15-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ], "t16-test": [ - "2000-01-01 00:00:00+00:00" + "2000-01-01 00:00:00+0100" ] } }, From 30e1b97600cf9f0f9a0f173131f73a8a54a0391a Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 17:27:49 -0400 Subject: [PATCH 4/9] Don't rely on incidental HTML parsing behaviour when testing implied-url I have no idea why I included these cases in the first place --- .../implied/implied-url.html | 6 - .../implied/implied-url.json | 108 ------------------ 2 files changed, 114 deletions(-) diff --git a/tests/microformats-v2-unit/implied/implied-url.html b/tests/microformats-v2-unit/implied/implied-url.html index aedac62..1af67ce 100644 --- a/tests/microformats-v2-unit/implied/implied-url.html +++ b/tests/microformats-v2-unit/implied/implied-url.html @@ -45,9 +45,6 @@ -Name -Name -Name
@@ -77,6 +74,3 @@ - - - diff --git a/tests/microformats-v2-unit/implied/implied-url.json b/tests/microformats-v2-unit/implied/implied-url.json index d305137..ca62d7e 100644 --- a/tests/microformats-v2-unit/implied/implied-url.json +++ b/tests/microformats-v2-unit/implied/implied-url.json @@ -403,42 +403,6 @@ ] } }, - { - "type": [ - "h-test-a-onlychildoftype-root-a" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-a-onlychildoftype-root-a-with-href" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test/Valid" - ] - } - }, - { - "type": [ - "h-test-a-onlychildoftype-root-a-with-href-empty" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test" - ] - } - }, { "type": [ "h-test-area-onlygrandchildoftype-href-missing" @@ -768,78 +732,6 @@ "Valid" ] } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a-with-href" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test/Valid" - ] - } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a-with-href" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test/Valid" - ] - } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a-with-href-empty" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test" - ] - } - }, - { - "type": [ - "h-test-a-onlygrandchildoftype-root-a-with-href-empty" - ], - "properties": { - "name": [ - "" - ], - "url": [ - "http://example.test" - ] - } } ], "rels": {}, From dcad7e4eba1f08b50e8ce22bd535955c47afbd97 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 17:59:10 -0400 Subject: [PATCH 5/9] Avoid testing blank implied names when testing implied-url This helps Go and Rust to pass Unfortunately it's virtually impossible to avoid implied names entirely in these cases --- .../implied/implied-url.html | 66 +++++++++--------- .../implied/implied-url.json | 68 +++++++++---------- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/tests/microformats-v2-unit/implied/implied-url.html b/tests/microformats-v2-unit/implied/implied-url.html index 1af67ce..97bb6bc 100644 --- a/tests/microformats-v2-unit/implied/implied-url.html +++ b/tests/microformats-v2-unit/implied/implied-url.html @@ -10,9 +10,9 @@ aspect of these tests, but resolution complexity is kept to a minimum. --> - - - +Name +Name +Name Name Name @@ -21,21 +21,21 @@
http://exaple.test/NotPartOfTest
Valid
-
-
-
-
-
-

-

-
-
-
- - - +
Name
+
Name
+
Name
+
Name
+
Name
+

Name
+

Name
+
NotPartOfTest
+
Name
+
Name
+Name +Name +Name -
+
Name
@@ -46,23 +46,23 @@ -
-
-
-
-
-

-

-

-

-
-
-
-
-
-
+
Name
+
Name
+
Name
+
Name
+
Name
+

Name
+

Name
+

Name
+

Name
+
NotPartOfTest
+
Name
+
Name
+
Name
+
Name
+
Name
-
+
Name
diff --git a/tests/microformats-v2-unit/implied/implied-url.json b/tests/microformats-v2-unit/implied/implied-url.json index ca62d7e..62dab0e 100644 --- a/tests/microformats-v2-unit/implied/implied-url.json +++ b/tests/microformats-v2-unit/implied/implied-url.json @@ -6,7 +6,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -16,7 +16,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test" @@ -29,7 +29,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -119,7 +119,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -129,7 +129,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test" @@ -142,7 +142,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -155,7 +155,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -165,7 +165,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -175,7 +175,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -188,7 +188,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -202,13 +202,13 @@ "properties": { "name": [ { - "value": "", + "value": "NotPartOfTest", "type": [ "h-test-child" ], "properties": { "name": [ - "" + "NotPartOfTest" ], "url": [ "http://example.test/ChildOnly" @@ -227,7 +227,7 @@ "http://example.test/NotPartOfTest" ], "name": [ - "" + "Name" ] } }, @@ -237,7 +237,7 @@ ], "properties": { "url": [ - "" + "Name" ] } }, @@ -247,7 +247,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -260,7 +260,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -273,7 +273,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test" @@ -286,7 +286,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -409,7 +409,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -419,7 +419,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test" @@ -432,7 +432,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -445,7 +445,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -455,7 +455,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -465,7 +465,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -478,7 +478,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -491,7 +491,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -501,7 +501,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, @@ -512,13 +512,13 @@ "properties": { "name": [ { - "value": "", + "value": "NotPartOfTest", "type": [ "h-test-child" ], "properties": { "name": [ - "" + "NotPartOfTest" ], "url": [ "http://example.test/ChildOnly" @@ -537,7 +537,7 @@ "http://example.test/NotPartOfTest" ], "name": [ - "" + "Name" ] } }, @@ -557,7 +557,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -570,7 +570,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test/Valid" @@ -583,7 +583,7 @@ ], "properties": { "name": [ - "" + "Name" ], "url": [ "http://example.test" @@ -596,7 +596,7 @@ ], "properties": { "name": [ - "" + "Name" ] } }, From 13979e4b9ee82a2959c0735e3e64a4e53cfb4507 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Fri, 1 May 2026 20:02:05 -0400 Subject: [PATCH 6/9] Avoid unnecessary blank implied name when testing implied-photo Not all blank implied names can be avoided, unfortunately --- .../implied/implied-photo.html | 12 +--- .../implied/implied-photo.json | 72 ++----------------- 2 files changed, 9 insertions(+), 75 deletions(-) diff --git a/tests/microformats-v2-unit/implied/implied-photo.html b/tests/microformats-v2-unit/implied/implied-photo.html index bfd29ff..df0afb6 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.html +++ b/tests/microformats-v2-unit/implied/implied-photo.html @@ -10,9 +10,7 @@ aspect of these tests, but resolution complexity is kept to a minimum. --> - - -NameOnly +Name Valid @@ -29,9 +27,7 @@
http://exaple.test/NotPartOfTest
Valid
-
-
-
NameOnly
+
Name
Valid
@@ -65,9 +61,7 @@ Name Name -
-
-
NameOnly
+
Name
Valid
diff --git a/tests/microformats-v2-unit/implied/implied-photo.json b/tests/microformats-v2-unit/implied/implied-photo.json index adb755b..7537031 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.json +++ b/tests/microformats-v2-unit/implied/implied-photo.json @@ -2,31 +2,11 @@ "items": [ { "type": [ - "h-test-img-src-missing-alt-missing" + "h-test-img-src-missing" ], "properties": { "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-src-missing-alt-empty" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-src-missing-alt-filled" - ], - "properties": { - "name": [ - "NameOnly" + "Name" ] } }, @@ -231,31 +211,11 @@ }, { "type": [ - "h-test-img-onlychildoftype-src-missing-alt-missing" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-onlychildoftype-src-missing-alt-empty" + "h-test-img-onlychildoftype-src-missing" ], "properties": { "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-onlychildoftype-src-missing-alt-filled" - ], - "properties": { - "name": [ - "NameOnly" + "Name" ] } }, @@ -676,31 +636,11 @@ }, { "type": [ - "h-test-img-onlygrandchildoftype-src-missing-alt-missing" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-onlygrandchildoftype-src-missing-alt-empty" - ], - "properties": { - "name": [ - "" - ] - } - }, - { - "type": [ - "h-test-img-onlygrandchildoftype-src-missing-alt-filled" + "h-test-img-onlygrandchildoftype-src-missing" ], "properties": { "name": [ - "NameOnly" + "Name" ] } }, From b771d3391859813d5738fd686c93fa505d06d04b Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 2 May 2026 08:15:48 -0400 Subject: [PATCH 7/9] Move implied-photo nested microformat cases out to separate file The segregated cases were also modified to smooth out implied-name interactions --- .../implied/implied-photo.html | 5 - .../implied/implied-photo.json | 100 ---------------- .../nested/nested-implied-photo.html | 6 + .../nested/nested-implied-photo.json | 112 ++++++++++++++++++ 4 files changed, 118 insertions(+), 105 deletions(-) create mode 100644 tests/microformats-v2-unit/nested/nested-implied-photo.html create mode 100644 tests/microformats-v2-unit/nested/nested-implied-photo.json diff --git a/tests/microformats-v2-unit/implied/implied-photo.html b/tests/microformats-v2-unit/implied/implied-photo.html index df0afb6..6c71bf9 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.html +++ b/tests/microformats-v2-unit/implied/implied-photo.html @@ -23,7 +23,6 @@ Name Name Name -
NotPartOfTest
http://exaple.test/NotPartOfTest
Valid
@@ -40,7 +39,6 @@


-
@@ -54,7 +52,6 @@
Name

Name
Name
-
NotPartOfTest
http://example.test/NameAndOverride
Valid
Name @@ -76,7 +73,6 @@



-
@@ -92,7 +88,6 @@
Name

Name
Name

-
NotPartOfTest
http://example.test/NameAndOverride
Valid
Name
diff --git a/tests/microformats-v2-unit/implied/implied-photo.json b/tests/microformats-v2-unit/implied/implied-photo.json index 7537031..cf37991 100644 --- a/tests/microformats-v2-unit/implied/implied-photo.json +++ b/tests/microformats-v2-unit/implied/implied-photo.json @@ -168,24 +168,6 @@ ] } }, - { - "type": [ - "h-test-object-data-filled-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-object-data-filled-has-u" @@ -387,29 +369,6 @@ ] } }, - { - "type": [ - "h-test-img-onlychildoftype-has-child" - ], - "properties": { - "name": [ - { - "value": "", - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "" - ], - "photo": [ - "http://example.test/ChildOnly" - ] - } - } - ] - } - }, { "type": [ "h-test-img-onlychildoftype-has-u" @@ -554,24 +513,6 @@ ] } }, - { - "type": [ - "h-test-object-onlychildoftype-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-object-onlychildoftype-has-u" @@ -832,29 +773,6 @@ ] } }, - { - "type": [ - "h-test-img-onlygrandchildoftype-has-child" - ], - "properties": { - "name": [ - { - "value": "", - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "" - ], - "photo": [ - "http://example.test/ChildOnly" - ] - } - } - ] - } - }, { "type": [ "h-test-img-onlygrandchildoftype-has-u" @@ -1019,24 +937,6 @@ ] } }, - { - "type": [ - "h-test-object-onlygrandchildoftype-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-object-onlygrandchildoftype-has-u" diff --git a/tests/microformats-v2-unit/nested/nested-implied-photo.html b/tests/microformats-v2-unit/nested/nested-implied-photo.html new file mode 100644 index 0000000..ebd4834 --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-photo.html @@ -0,0 +1,6 @@ + +
NotPartOfTest
+
NotPartOfTest
+
NotPartOfTest
+
NotPartOfTest
+
NotPartOfTest
\ No newline at end of file diff --git a/tests/microformats-v2-unit/nested/nested-implied-photo.json b/tests/microformats-v2-unit/nested/nested-implied-photo.json new file mode 100644 index 0000000..bee4438 --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-photo.json @@ -0,0 +1,112 @@ +{ + "items": [ + { + "type": [ + "h-test-object-data-filled-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + }, + { + "type": [ + "h-test-img-onlychildoftype-has-child" + ], + "properties": { + "name": [ + { + "value": "NotPartOfTest", + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ], + "photo": [ + { + "value": "http://example.test/ChildOnly", + "alt": "NotPartOfTest" + } + ] + } + } + ] + } + }, + { + "type": [ + "h-test-object-onlychildoftype-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + }, + { + "type": [ + "h-test-img-onlygrandchildoftype-has-child" + ], + "properties": { + "name": [ + { + "value": "NotPartOfTest", + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ], + "photo": [ + { + "value": "http://example.test/ChildOnly", + "alt": "NotPartOfTest" + } + ] + } + } + ] + } + }, + { + "type": [ + "h-test-object-onlygrandchildoftype-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + } + ], + "rels": {}, + "rel-urls": {} +} From edf407bfd452b2ab30bbdcdb346691aece6ee845 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 2 May 2026 08:26:18 -0400 Subject: [PATCH 8/9] Move implied-url nested microformat cases out to separate file At least js-shiv fails this test due to differences in nested microformat handling --- .../implied/implied-url.html | 5 - .../implied/implied-url.json | 100 ----------------- .../nested/nested-implied-url.html | 6 + .../nested/nested-implied-url.json | 106 ++++++++++++++++++ 4 files changed, 112 insertions(+), 105 deletions(-) create mode 100644 tests/microformats-v2-unit/nested/nested-implied-url.html create mode 100644 tests/microformats-v2-unit/nested/nested-implied-url.json diff --git a/tests/microformats-v2-unit/implied/implied-url.html b/tests/microformats-v2-unit/implied/implied-url.html index 97bb6bc..4639316 100644 --- a/tests/microformats-v2-unit/implied/implied-url.html +++ b/tests/microformats-v2-unit/implied/implied-url.html @@ -17,7 +17,6 @@ Name Name Name -
NotPartOfTest
http://exaple.test/NotPartOfTest
Valid
@@ -28,7 +27,6 @@
Name

Name

Name
-
NotPartOfTest
Name
Name
Name @@ -42,7 +40,6 @@ - @@ -55,7 +52,6 @@

Name

Name

Name
-
NotPartOfTest
Name
Name
Name
@@ -71,6 +67,5 @@ - diff --git a/tests/microformats-v2-unit/implied/implied-url.json b/tests/microformats-v2-unit/implied/implied-url.json index 62dab0e..f0e1d37 100644 --- a/tests/microformats-v2-unit/implied/implied-url.json +++ b/tests/microformats-v2-unit/implied/implied-url.json @@ -72,24 +72,6 @@ ] } }, - { - "type": [ - "h-test-a-href-filled-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-a-href-filled-has-u" @@ -195,29 +177,6 @@ ] } }, - { - "type": [ - "h-test-area-onlychildoftype-has-child" - ], - "properties": { - "name": [ - { - "value": "NotPartOfTest", - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ], - "url": [ - "http://example.test/ChildOnly" - ] - } - } - ] - } - }, { "type": [ "h-test-area-onlychildoftype-has-u" @@ -362,24 +321,6 @@ ] } }, - { - "type": [ - "h-test-a-onlychildoftype-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-a-onlychildoftype-has-u" @@ -505,29 +446,6 @@ ] } }, - { - "type": [ - "h-test-area-onlygrandchildoftype-has-child" - ], - "properties": { - "name": [ - { - "value": "NotPartOfTest", - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ], - "url": [ - "http://example.test/ChildOnly" - ] - } - } - ] - } - }, { "type": [ "h-test-area-onlygrandchildoftype-has-u" @@ -692,24 +610,6 @@ ] } }, - { - "type": [ - "h-test-a-onlygrandchildoftype-has-child" - ], - "properties": {}, - "children": [ - { - "type": [ - "h-test-child" - ], - "properties": { - "name": [ - "NotPartOfTest" - ] - } - } - ] - }, { "type": [ "h-test-a-onlygrandchildoftype-has-u" diff --git a/tests/microformats-v2-unit/nested/nested-implied-url.html b/tests/microformats-v2-unit/nested/nested-implied-url.html new file mode 100644 index 0000000..c7601ff --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-url.html @@ -0,0 +1,6 @@ + +
NotPartOfTest
+
NotPartOfTest
+ +
NotPartOfTest
+ \ No newline at end of file diff --git a/tests/microformats-v2-unit/nested/nested-implied-url.json b/tests/microformats-v2-unit/nested/nested-implied-url.json new file mode 100644 index 0000000..e18f632 --- /dev/null +++ b/tests/microformats-v2-unit/nested/nested-implied-url.json @@ -0,0 +1,106 @@ +{ + "items": [ + { + "type": [ + "h-test-a-href-filled-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + }, + { + "type": [ + "h-test-area-onlychildoftype-has-child" + ], + "properties": { + "name": [ + { + "value": "NotPartOfTest", + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ], + "url": [ + "http://example.test/ChildOnly" + ] + } + } + ] + } + }, + { + "type": [ + "h-test-a-onlychildoftype-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + }, + { + "type": [ + "h-test-area-onlygrandchildoftype-has-child" + ], + "properties": { + "name": [ + { + "value": "NotPartOfTest", + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ], + "url": [ + "http://example.test/ChildOnly" + ] + } + } + ] + } + }, + { + "type": [ + "h-test-a-onlygrandchildoftype-has-child" + ], + "properties": {}, + "children": [ + { + "type": [ + "h-test-child" + ], + "properties": { + "name": [ + "NotPartOfTest" + ] + } + } + ] + } + ], + "rels": {}, + "rel-urls": {} +} From 958bfc6fd612a4be7dbaf905557845dd3d553d3f Mon Sep 17 00:00:00 2001 From: "J. King" Date: Sat, 2 May 2026 08:58:10 -0400 Subject: [PATCH 9/9] Add terminal whitespace for consistency --- tests/microformats-v2-unit/nested/nested-implied-name.html | 2 +- tests/microformats-v2-unit/nested/nested-implied-photo.html | 2 +- tests/microformats-v2-unit/nested/nested-implied-url.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/microformats-v2-unit/nested/nested-implied-name.html b/tests/microformats-v2-unit/nested/nested-implied-name.html index c56709c..d7e7327 100644 --- a/tests/microformats-v2-unit/nested/nested-implied-name.html +++ b/tests/microformats-v2-unit/nested/nested-implied-name.html @@ -7,4 +7,4 @@
NotPartOfTestNotPartOfTest
Invalid -
\ No newline at end of file +
diff --git a/tests/microformats-v2-unit/nested/nested-implied-photo.html b/tests/microformats-v2-unit/nested/nested-implied-photo.html index ebd4834..c8002ad 100644 --- a/tests/microformats-v2-unit/nested/nested-implied-photo.html +++ b/tests/microformats-v2-unit/nested/nested-implied-photo.html @@ -3,4 +3,4 @@
NotPartOfTest
NotPartOfTest
NotPartOfTest
-
NotPartOfTest
\ No newline at end of file +
NotPartOfTest
diff --git a/tests/microformats-v2-unit/nested/nested-implied-url.html b/tests/microformats-v2-unit/nested/nested-implied-url.html index c7601ff..7191293 100644 --- a/tests/microformats-v2-unit/nested/nested-implied-url.html +++ b/tests/microformats-v2-unit/nested/nested-implied-url.html @@ -3,4 +3,4 @@
NotPartOfTest
NotPartOfTest
- \ No newline at end of file +