Skip to content

Commit

Permalink
chore: formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowtime2000 committed Dec 5, 2020
1 parent c0deae3 commit 1303773
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function compile(str: string, config?: PartialConfig): TemplateFu

/* ASYNC HANDLING */
// The below code is modified from mde/ejs. All credit should go to them.
const ctor = options.async ? getAsyncFunctionConstructor() as FunctionConstructor : Function
const ctor = options.async ? (getAsyncFunctionConstructor() as FunctionConstructor) : Function
/* END ASYNC HANDLING */

try {
Expand Down
9 changes: 8 additions & 1 deletion src/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,14 @@ export default function parse(str: string, config: EtaConfig): Array<AstObject>

trimLeftOfNextStr = closeTag[2]

const currentType: TagType = prefix === parseOptions.exec ? 'e' : (prefix === parseOptions.raw ? 'r' : (prefix === parseOptions.interpolate ? 'i' : ''))
const currentType: TagType =
prefix === parseOptions.exec
? 'e'
: prefix === parseOptions.raw
? 'r'
: prefix === parseOptions.interpolate
? 'i'
: ''

currentObj = { t: currentType, val: content }
break
Expand Down

0 comments on commit 1303773

Please sign in to comment.