summaryrefslogtreecommitdiff
path: root/src/compiler/codegen.ts
diff options
context:
space:
mode:
authorGravatar matthewp <matthewp@users.noreply.github.com> 2021-04-09 18:09:44 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-04-09 18:09:44 +0000
commit62924b31628a40adf0efd52c53086362070c4d8b (patch)
treef3c263e8207f6ba3c862e37c80df0475e46257fb /src/compiler/codegen.ts
parentad9c3b1d8dbf1c3aff75497271347ed36ea38a0b (diff)
downloadastro-62924b31628a40adf0efd52c53086362070c4d8b.tar.gz
astro-62924b31628a40adf0efd52c53086362070c4d8b.tar.zst
astro-62924b31628a40adf0efd52c53086362070c4d8b.zip
[ci] npm run format
Diffstat (limited to 'src/compiler/codegen.ts')
-rw-r--r--src/compiler/codegen.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/codegen.ts b/src/compiler/codegen.ts
index 8bcf3f49d..020d55376 100644
--- a/src/compiler/codegen.ts
+++ b/src/compiler/codegen.ts
@@ -94,7 +94,7 @@ function getAttributes(attrs: Attribute[]): Record<string, string> {
/** Get value from a TemplateNode Attribute (text attributes only!) */
function getTextFromAttribute(attr: any): string {
- switch(attr.type) {
+ switch (attr.type) {
case 'Text': {
if (attr.raw !== undefined) {
return attr.raw;
@@ -479,7 +479,7 @@ function compileHtml(enterNode: TemplateNode, state: CodegenState, compileOption
switch (node.type) {
case 'Expression': {
let child = '';
- if(node.children!.length) {
+ if (node.children!.length) {
child = compileHtml(node.children![0], state, compileOptions);
}
let raw = node.codeStart + child + node.codeEnd;