Closed evan-dickinson closed 5 years ago
Hmm, I disagree with the expected result; the single quotes should not be escaped within template literals:
'\\`Lorem\\` ipsum "dolor" sit 'amet' etc.'
I've updated data.js as you requested.
The reason the expected result string has backslashes before the single quotes is because it's a single-quoted string literal, not a template literal. (It's a subtle difference, and easy to miss 😀.)
Ooh, gotcha :) I see.
Thanks for the patch, @evan-dickinson!
In this code, backtick characters are not escaped:
Expected result:
Actual result:
The cause of the problem is in
regexWhitelist
. The backtick character is in the whitelist, so theif
statement at line 265 fires, and the code never gets to the special-case handling for the backtick. I updated the whitelist so that it doesn't include the backtick.