@holmdigital/engine 3.1.3 → 3.1.4

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.
@@ -239,7 +239,7 @@ function selectMappedRuleId(ruleId, tags, rules) {
239
239
  return matched[0].ruleId;
240
240
  }
241
241
  function getEngineVersion() {
242
- return "3.1.3";
242
+ return "3.1.4";
243
243
  }
244
244
  function getStandardsVersion() {
245
245
  try {
@@ -1173,9 +1173,15 @@ async function generateStatementContent(result, lang = "en", format = "html", me
1173
1173
  };
1174
1174
  const title = processText(template.title);
1175
1175
  const intro = processText(template.intro);
1176
- const sections = template.sections.map((s) => `## ${s.title}
1176
+ const enforcementBody = String(substitutions["{<enforcement_body>}"] ?? "").trim();
1177
+ const sections = template.sections.map((s) => {
1178
+ if (s.id === "enforcement" && enforcementBody === "") return null;
1179
+ const body = processText(s.content).trim();
1180
+ if (body === "") return null;
1181
+ return s.title ? `## ${s.title}
1177
1182
 
1178
- ${processText(s.content)}`).join("\n\n");
1183
+ ${body}` : body;
1184
+ }).filter((x) => x !== null).join("\n\n");
1179
1185
  content = `# ${title}
1180
1186
 
1181
1187
  ${intro}
package/dist/cli/index.js CHANGED
@@ -1488,7 +1488,7 @@ function selectMappedRuleId(ruleId, tags, rules) {
1488
1488
  return matched[0].ruleId;
1489
1489
  }
1490
1490
  function getEngineVersion() {
1491
- return "3.1.3";
1491
+ return "3.1.4";
1492
1492
  }
1493
1493
  function getStandardsVersion() {
1494
1494
  try {
@@ -3251,9 +3251,15 @@ async function generateStatementContent(result, lang = "en", format = "html", me
3251
3251
  };
3252
3252
  const title = processText(template.title);
3253
3253
  const intro = processText(template.intro);
3254
- const sections = template.sections.map((s) => `## ${s.title}
3255
-
3256
- ${processText(s.content)}`).join("\n\n");
3254
+ const enforcementBody = String(substitutions["{<enforcement_body>}"] ?? "").trim();
3255
+ const sections = template.sections.map((s) => {
3256
+ if (s.id === "enforcement" && enforcementBody === "") return null;
3257
+ const body = processText(s.content).trim();
3258
+ if (body === "") return null;
3259
+ return s.title ? `## ${s.title}
3260
+
3261
+ ${body}` : body;
3262
+ }).filter((x) => x !== null).join("\n\n");
3257
3263
  content = `# ${title}
3258
3264
 
3259
3265
  ${intro}
@@ -8,7 +8,7 @@ import {
8
8
  generateStatementContent,
9
9
  getEngineVersion,
10
10
  isBadgeWithheldByRobustness
11
- } from "../chunk-BRZQK4KN.mjs";
11
+ } from "../chunk-5GV3T3S4.mjs";
12
12
  import {
13
13
  groupReportsByRule,
14
14
  impactBreakdown,
package/dist/index.js CHANGED
@@ -1158,7 +1158,7 @@ function selectMappedRuleId(ruleId, tags, rules) {
1158
1158
  return matched[0].ruleId;
1159
1159
  }
1160
1160
  function getEngineVersion() {
1161
- return "3.1.3";
1161
+ return "3.1.4";
1162
1162
  }
1163
1163
  function getStandardsVersion() {
1164
1164
  try {
@@ -2095,9 +2095,15 @@ async function generateStatementContent(result, lang = "en", format = "html", me
2095
2095
  };
2096
2096
  const title = processText(template.title);
2097
2097
  const intro = processText(template.intro);
2098
- const sections = template.sections.map((s) => `## ${s.title}
2098
+ const enforcementBody = String(substitutions["{<enforcement_body>}"] ?? "").trim();
2099
+ const sections = template.sections.map((s) => {
2100
+ if (s.id === "enforcement" && enforcementBody === "") return null;
2101
+ const body = processText(s.content).trim();
2102
+ if (body === "") return null;
2103
+ return s.title ? `## ${s.title}
2099
2104
 
2100
- ${processText(s.content)}`).join("\n\n");
2105
+ ${body}` : body;
2106
+ }).filter((x) => x !== null).join("\n\n");
2101
2107
  content = `# ${title}
2102
2108
 
2103
2109
  ${intro}
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
  resolveNationalLawReference,
14
14
  selectMappedRuleId,
15
15
  wcagTagToCriterion
16
- } from "./chunk-BRZQK4KN.mjs";
16
+ } from "./chunk-5GV3T3S4.mjs";
17
17
  import {
18
18
  getCurrentLang,
19
19
  setLanguage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holmdigital/engine",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"