7a0f603b11
* Don’t offer to extract export assignment * Terminate unterminated literals when extracting them * Add test with regular expression ending in backslash * Add test for string literal ending in backslash * Remove unused parameter default
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
// Unterminated template literal:
|
|
//// /*1*/const foo = /endsinbackslash\/*2*/
|
|
|
|
goTo.select("1", "2");
|
|
edit.applyRefactor({
|
|
refactorName: "Extract Symbol",
|
|
actionName: "function_scope_0",
|
|
actionDescription: "Extract to function in global scope",
|
|
newContent: `const foo = /*RENAME*/newFunction()
|
|
|
|
function newFunction() {
|
|
return /endsinbackslash\\ /;
|
|
}
|
|
`
|
|
});
|