(text: string)
| 112 | * offsets stay valid and their contents can't be mistaken for code. */ |
| 113 | const withLiteralsBlanked = (code: string): string => { |
| 114 | const blank = (text: string): string => text.replace(/[^\n]/g, " "); |
| 115 | return code.replace( |
| 116 | // Order matters: line comment, block comment, then each quote flavour. |
| 117 | /\/\/[^\n]*|\/\*[\s\S]*?\*\/|'(?:\\.|[^'\\\n])*'|"(?:\\.|[^"\\\n])*"|`(?:\\.|[^`\\])*`/g, |