Skip to content

Commit fbdb604

Browse files
authored
removed escape from backtick (#482)
* removed escape from backtick * tweaked test to make more sense
1 parent 8b42131 commit fbdb604

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

src/TSHelper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ export class TSHelper {
687687
const escapeSequences: Array<[RegExp, string]> = [
688688
[/[\\]/g, "\\\\"],
689689
[/[\']/g, "\\\'"],
690-
[/[\`]/g, "\\\`"],
691690
[/[\"]/g, "\\\""],
692691
[/[\n]/g, "\\n"],
693692
[/[\r]/g, "\\r"],

test/translation/lua/characterEscapeSequence.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ local quoteInTemplateString = "\' \' \'";
33
local doubleQuoteInQuotes = "\" \" \"";
44
local doubleQuoteInDoubleQuotes = "\" \" \"";
55
local doubleQuoteInTemplateString = "\" \" \"";
6-
local escapedCharsInQuotes = "\\ \0 \b \t \n \v \f \" \' \`";
7-
local escapedCharsInDoubleQUotes = "\\ \0 \b \t \n \v \f \" \' \`";
8-
local escapedCharsInTemplateString = "\\ \0 \b \t \n \v \f \" \' \`";
6+
local backQuoteInQuotes = "` ` `";
7+
local backQuoteInDoubleQuotes = "` ` `";
8+
local backQuoteInTemplateString = "` ` `";
9+
local escapedCharsInQuotes = "\\ \0 \b \t \n \v \f \" \' `";
10+
local escapedCharsInDoubleQUotes = "\\ \0 \b \t \n \v \f \" \'";
11+
local escapedCharsInTemplateString = "\\ \0 \b \t \n \v \f \" \' `";
912
local nonEmptyTemplateString = "Level 0: \n\t " .. (tostring("Level 1: \n\t\t " .. (tostring("Level 3: \n\t\t\t " .. (tostring("Last level \n --") .. " \n --")) .. " \n --")) .. " \n --");

test/translation/ts/characterEscapeSequence.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ let doubleQuoteInQuotes = '" " "';
55
let doubleQuoteInDoubleQuotes = "\" \" \"";
66
let doubleQuoteInTemplateString = `" " "`;
77

8+
let backQuoteInQuotes = '` ` `';
9+
let backQuoteInDoubleQuotes = "` ` `";
10+
let backQuoteInTemplateString = `\` \` \``;
11+
812
let escapedCharsInQuotes = '\\ \0 \b \t \n \v \f \" \' \`';
9-
let escapedCharsInDoubleQUotes = "\\ \0 \b \t \n \v \f \" \' \`";
13+
let escapedCharsInDoubleQUotes = "\\ \0 \b \t \n \v \f \" \'";
1014
let escapedCharsInTemplateString = `\\ \0 \b \t \n \v \f \" \' \``;
1115

1216
let nonEmptyTemplateString = `Level 0: \n\t ${`Level 1: \n\t\t ${`Level 3: \n\t\t\t ${'Last level \n --'} \n --`} \n --`} \n --`;

0 commit comments

Comments
 (0)