Fix nlb property for template strings tokens starting with nlb

Also add .gitattributes to checkout lf eol style
This commit is contained in:
Anthony Van de Gejuchte
2016-10-28 23:47:03 +02:00
committed by Richard van Velzen
parent 0aa526e72c
commit 1b2c02c944
4 changed files with 247 additions and 210 deletions

View File

@@ -341,3 +341,39 @@ escape_dollar_curly: {
}
expect_exact: "console.log(`\\${ beep }`);console.log(`1\\${2-0}\\${3-0}4`);console.log(`\\${not an expression}`);"
}
template_starting_with_newline: {
options = {
dead_code: true
}
input: {
function foo(e) {
return `
this is a template string!`;
};
} expect_exact: "function foo(e){return`\nthis is a template string!`}"
}
template_with_newline: {
options = {
dead_code: true
}
input: {
function foo(e) {
return `yep,
this is a template string!`;
};
} expect_exact: "function foo(e){return`yep,\nthis is a template string!`}"
}
template_ending_with_newline: {
options = {
dead_code: true
}
input: {
function foo(e) {
return `this is a template string!
`;
};
} expect_exact: "function foo(e){return`this is a template string!\n`}"
}