Commit bd3f80e
authored
fix: Replace single quotes
Fixes
github/continuous-ai-for-accessibility#61
(Hubber access only)
Inspired by @abdulahmad307’s single-quote handling in
[axeRuleManager.ts#L57-L60](https://github.com/github/accessibility-scorecard/blob/e554f2588c30a26b4e9c35ee48c527340bbb72ef/.github/actions/get-page-axe-violations-service-maps/src/axeRuleManager.ts#L57-L60)
(Hubber access only)
When findings include single quotes, attempts to cache them can fail
with errors like:
```
syntax error near unexpected token `('
```
One solution would be to escape single quotes; however, all tools (shell
and node) that interact with this string would need to handle the
escaped characters the same way. Instead, this PR’s approach replaces
single quote characters with typographical quotes, which do not need to
be escaped.' with typographical quotes ’ to avoid syntax errors (#994)1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments