Skip to content

Commit 2fccad0

Browse files
committed
fix(plugin): trim the template when in append experience mode
1 parent 994eb99 commit 2fccad0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/plugin/src/generators/init/generator.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,10 @@ ${appComponentTemplateContent}
181181
updatedContent,
182182
'PropertyAssignment:has(Identifier[name="template"]) NoSubstitutionTemplateLiteral',
183183
(node: NoSubstitutionTemplateLiteral) => {
184+
const fullText = node.getFullText().trim().slice(1, -1);
184185
return generateExperience === 'append'
185186
? `\`
186-
${node.getFullText()}
187+
${fullText}
187188
<ngt-canvas [sceneGraph]="sceneGraph" />\``
188189
: `\`<ngt-canvas [sceneGraph]="sceneGraph" />\``;
189190
},

0 commit comments

Comments
 (0)