clean up loose template literals
This commit is contained in:
parent
6b836de306
commit
e258b85420
@ -42,7 +42,8 @@ File.helpers = [
|
||||
|
||||
File.excludeHelpersFromRuntime = [
|
||||
"async-to-generator",
|
||||
"typeof"
|
||||
"typeof",
|
||||
"tagged-template-literal-loose"
|
||||
];
|
||||
|
||||
File.normaliseOptions = function (opts) {
|
||||
|
||||
@ -20,11 +20,10 @@ exports.TaggedTemplateExpression = function (node, parent, file) {
|
||||
strings = t.arrayExpression(strings);
|
||||
raw = t.arrayExpression(raw);
|
||||
|
||||
var template = file.isLoose("templateLiterals") ?
|
||||
"tagged-template-literal-loose" :
|
||||
"tagged-template-literal";
|
||||
var templateName = "tagged-template-literal";
|
||||
if (file.isLoose("templateLiterals")) templateName += "-loose";
|
||||
args.push(t.callExpression(file.addHelper(templateName), [strings, raw]));
|
||||
|
||||
args.push(t.callExpression(file.addHelper(template), [strings, raw]));
|
||||
args = args.concat(quasi.expressions);
|
||||
|
||||
return t.callExpression(node.tag, args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user