Skip to content

Commit

Permalink
Fix hyphens (#2322)
Browse files Browse the repository at this point in the history
* swap special characters to vanilla hyphens

* remove hyphen replacement

* fix format unit tests

---------

Co-authored-by: Curt Bonade <[email protected]>
  • Loading branch information
CBonade and Curt Bonade authored Oct 18, 2024
1 parent 0f53643 commit f395d98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
13 changes: 4 additions & 9 deletions src/applications/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
},
{
"path": "burials-and-memorials/pre-need/form-10007-apply-for-eligibility/",
"name": "Pre&#8211;need eligibility determination"
"name": "Pre-need eligibility determination"
}
]
}
Expand Down Expand Up @@ -1190,7 +1190,7 @@
"path": "supporting-forms-for-claims"
},
{
"name": "Authorize the release of non&#8208;VA medical information to VA",
"name": "Authorize the release of non-VA medical information to VA",
"path": "supporting-forms-for-claims/release-information-to-va-form-21-4142"
}
]
Expand Down Expand Up @@ -1644,9 +1644,7 @@
"minimalHeader": {
"title": "Submit a statement to support a claim",
"subtitle": "Statement in support of a claim (VA Form 21-4138)",
"excludePaths": [
"/introduction"
]
"excludePaths": ["/introduction"]
}
}
},
Expand Down Expand Up @@ -1745,10 +1743,7 @@
"minimalHeader": {
"title": "Explore pattern demonstrations in our sample form",
"subtitle": "Mock Form Minimal Header",
"excludePaths": [
"/introduction",
"/confirmation"
]
"excludePaths": ["/introduction", "/confirmation"]
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions src/site/filters/liquid.js
Original file line number Diff line number Diff line change
Expand Up @@ -779,8 +779,8 @@ module.exports = function registerFilters() {
} = /** @type {{path: string, children: array}} */ (crumb);
let { name } = /** @type {{name: string}} */ (crumb);

// Replace hyphens in the name with spaces
name = name.replace('-', ' ');
// // Replace hyphens in the name with spaces
// name = name.replace('-', ' '); // commenting this out to ensure proper functionality

// Capitalize the first letter of the name
name = name.charAt(0).toUpperCase() + name.slice(1);
Expand Down
4 changes: 2 additions & 2 deletions src/site/filters/liquid.unit.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ describe('formatForBreadcrumbsHTML', () => {
// Verify output
expect(output).to.eq(
JSON.stringify(
'[{"href":"/","isRouterLink":false,"label":"VA.gov home","lang":"en-US"},{"href":"/view-change-dependents/","isRouterLink":false,"label":"View or change dependents on your VA disability benefits","lang":"en-US"},{"href":"/view-change-dependents/add-remove-form-21-686c-v2/","isRouterLink":false,"label":"Add or remove dependents with VA Form 21 686C","lang":"en-US"}]',
'[{"href":"/","isRouterLink":false,"label":"VA.gov home","lang":"en-US"},{"href":"/view-change-dependents/","isRouterLink":false,"label":"View or change dependents on your VA disability benefits","lang":"en-US"},{"href":"/view-change-dependents/add-remove-form-21-686c-v2/","isRouterLink":false,"label":"Add or remove dependents with VA Form 21-686C","lang":"en-US"}]',
),
);
});
Expand All @@ -970,7 +970,7 @@ describe('formatForBreadcrumbsHTML', () => {
// Verify output
expect(output).to.eq(
JSON.stringify(
'[{"href":"/","isRouterLink":false,"label":"VA.gov home","lang":"en-US"},{"href":"/view-change-dependents/","isRouterLink":false,"label":"View or change dependents on your VA disability benefits","lang":"en-US"},{"href":"/view-change-dependents/add-remove-form-21-686c-v2/","isRouterLink":false,"label":"Add or remove dependents with VA Form 21 686C","lang":"en-US"}]',
'[{"href":"/","isRouterLink":false,"label":"VA.gov home","lang":"en-US"},{"href":"/view-change-dependents/","isRouterLink":false,"label":"View or change dependents on your VA disability benefits","lang":"en-US"},{"href":"/view-change-dependents/add-remove-form-21-686c-v2/","isRouterLink":false,"label":"Add or remove dependents with VA Form 21-686C","lang":"en-US"}]',
),
);
});
Expand Down

0 comments on commit f395d98

Please sign in to comment.