(chars: string[], index: number)
| 136 | } |
| 137 | |
| 138 | function isOpeningContext(chars: string[], index: number): boolean { |
| 139 | if (index === 0) { |
| 140 | return true |
| 141 | } |
| 142 | const prev = chars[index - 1] |
| 143 | return ( |
| 144 | prev === ' ' || |
| 145 | prev === '\t' || |
| 146 | prev === '\n' || |
| 147 | prev === '\r' || |
| 148 | prev === '(' || |
| 149 | prev === '[' || |
| 150 | prev === '{' || |
| 151 | prev === '\u2014' || // em dash |
| 152 | prev === '\u2013' // en dash |
| 153 | ) |
| 154 | } |
| 155 | |
| 156 | function applyCurlyDoubleQuotes(str: string): string { |
| 157 | const chars = [...str] |
no outgoing calls
no test coverage detected