We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b36a7a9 commit 3ed5c79Copy full SHA for 3ed5c79
test/prefer-string-raw.js
@@ -45,15 +45,22 @@ test.snapshot({
45
46
test.snapshot({
47
valid: [
48
+ // No backslash
49
'a = `a`',
50
'a = `${foo}`',
51
'a = `a${100}b`',
- 'a = `a\\t${foo.bar}b\\\\c`',
52
- 'a = `${foo}\\\\a${bar}\\``',
53
- 'a = `a\\${`',
54
- 'a = `${a}\\\'${b}\\\\`',
55
- 'a = `\\"a\\\\b`',
+
+ // Escaped characters other than backslash
+ 'a = `a\\t${foo.bar}b\\\\c`', // \t
+ 'a = `${foo}\\\\a${bar}\\``', // \`
56
+ 'a = `a\\${`', // \$
57
+ 'a = `${a}\\\'${b}\\\\`', // \'
58
+ 'a = `\\"a\\\\b`', // \"
59
60
+ // Ending with backslash
61
'a = `\\\\a${foo}b\\\\${foo}`',
62
63
+ // Multiline
64
outdent`
65
a = \`\\\\a \\
66
b\`
0 commit comments