From 18727aa660c7f3f5bdd8c468e86d31d9f4dc49ee Mon Sep 17 00:00:00 2001 From: Abhishek Bindra Date: Fri, 25 Oct 2024 20:37:52 +0530 Subject: [PATCH 1/2] exclude data percy attributes for selector --- lib/core/utils/get-selector.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/core/utils/get-selector.js b/lib/core/utils/get-selector.js index 470946705..fbb7e7a7f 100644 --- a/lib/core/utils/get-selector.js +++ b/lib/core/utils/get-selector.js @@ -83,6 +83,7 @@ function countSort(a, b) { function filterAttributes(at) { return ( !ignoredAttributes.includes(at.name) && + /data-percy-/.test(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH) ); From 0a2446bda36ae5529b5f5655f2c533606c836052 Mon Sep 17 00:00:00 2001 From: Abhishek Bindra Date: Mon, 28 Oct 2024 17:09:34 +0530 Subject: [PATCH 2/2] fix attribute filter --- lib/core/utils/get-selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/utils/get-selector.js b/lib/core/utils/get-selector.js index fbb7e7a7f..17ffdb0ff 100644 --- a/lib/core/utils/get-selector.js +++ b/lib/core/utils/get-selector.js @@ -83,7 +83,7 @@ function countSort(a, b) { function filterAttributes(at) { return ( !ignoredAttributes.includes(at.name) && - /data-percy-/.test(at.name) && + !/data-percy-/.test(at.name) && at.name.indexOf(':') === -1 && (!at.value || at.value.length < MAXATTRIBUTELENGTH) );