Split code

This commit is contained in:
Adria Navarro 2024-03-14 22:32:17 +01:00
parent 03122b464f
commit acbb06edf7
1 changed files with 9 additions and 10 deletions

View File

@ -168,8 +168,7 @@ export function processStringSync(
function process(stringPart: string) { function process(stringPart: string) {
const template = createTemplate(stringPart, opts) const template = createTemplate(stringPart, opts)
const now = Math.floor(Date.now() / 1000) * 1000 const now = Math.floor(Date.now() / 1000) * 1000
return postprocess( const processedString = template({
template({
now: new Date(now).toISOString(), now: new Date(now).toISOString(),
__opts: { __opts: {
...opts, ...opts,
@ -177,7 +176,7 @@ export function processStringSync(
}, },
...context, ...context,
}) })
) return postprocess(processedString)
} }
try { try {
if (opts && opts.onlyFound) { if (opts && opts.onlyFound) {