@plainconceptsplatform/workflows 1.18.0 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,8 +25,13 @@ export const VIEWPORTS = [
|
|
|
25
25
|
const SECTION_ID = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
26
26
|
const STATES = new Set(["default", "empty", "loading", "error", "success", "disabled", "mobile"]);
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// Literal patterns only: a RegExp built from a variable is a blocking Semgrep finding
|
|
29
|
+
// (detect-non-literal-regexp) in every consumer that runs the family scan.
|
|
30
|
+
const ATTRIBUTE_PATTERNS = {
|
|
31
|
+
"data-mockup-section": /\bdata-mockup-section\s*=\s*["']([^"']*)["']/gi,
|
|
32
|
+
"data-component": /\bdata-component\s*=\s*["']([^"']*)["']/gi,
|
|
33
|
+
};
|
|
34
|
+
const attributeValues = (html, name) => [...html.matchAll(ATTRIBUTE_PATTERNS[name])].map((match) => match[1].trim());
|
|
30
35
|
|
|
31
36
|
// What the contract forbids, as the reasons a person reading the run would want.
|
|
32
37
|
export function htmlProblems(html) {
|