From a1d2b80ff990d5aaac0128e30ecefb3ba7d830e1 Mon Sep 17 00:00:00 2001 From: Albin Ekblom Date: Mon, 18 Nov 2024 21:01:23 +0100 Subject: [PATCH 1/2] Add failing test for button type=other --- test/index.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/index.js b/test/index.js index 425d22d..81d164d 100644 --- a/test/index.js +++ b/test/index.js @@ -245,6 +245,34 @@ test('fromParse5', async function (t) { } ) }) + + await t.test('should handle unknown attributes', async function () { + assert.deepEqual( + fromParse5(parseFragment('')), + { + type: 'root', + children: [ + { + type: 'element', + tagName: 'button', + properties: { + type: 'other', + disabled: true + }, + children: [ + { + type: 'text', + value: 'Hello' + } + ] + } + ], + data: { + quirksMode: false + } + } + ) + }) }) test('fixtures', async function (t) { From 4aac2b8df7ed733ff6fc95af73d7b4dd03084e8d Mon Sep 17 00:00:00 2001 From: Albin Ekblom Date: Mon, 18 Nov 2024 23:23:24 +0100 Subject: [PATCH 2/2] Update hastscript to 9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f7fb54..04c062d 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", - "hastscript": "^8.0.0", + "hastscript": "^9.0.0", "property-information": "^6.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0",