(str: string)
| 29 | * @returns The string with all curly quotes replaced by straight quotes |
| 30 | */ |
| 31 | export function normalizeQuotes(str: string): string { |
| 32 | return str |
| 33 | .replaceAll(LEFT_SINGLE_CURLY_QUOTE, "'") |
| 34 | .replaceAll(RIGHT_SINGLE_CURLY_QUOTE, "'") |
| 35 | .replaceAll(LEFT_DOUBLE_CURLY_QUOTE, '"') |
| 36 | .replaceAll(RIGHT_DOUBLE_CURLY_QUOTE, '"') |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Strips trailing whitespace from each line in a string while preserving line endings |