Fixed templates
All checks were successful
Build / Publish Docs (push) Successful in 1m14s
Build / Build NPM Project (push) Successful in 1m38s
Build / Tag Version (push) Successful in 11s

This commit is contained in:
2025-12-06 21:34:21 -05:00
parent df517b6078
commit 32c61fff42
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ztimson/utils", "name": "@ztimson/utils",
"version": "0.27.17", "version": "0.27.18",
"description": "Utility library", "description": "Utility library",
"author": "Zak Timson", "author": "Zak Timson",
"license": "MIT", "license": "MIT",

View File

@@ -71,7 +71,7 @@ export async function renderTemplate(template: string, data: any, fetch?: (file:
// Extends: `{{ > file.html:property }} CONTENT {{ /> }}` // Extends: `{{ > file.html:property }} CONTENT {{ /> }}`
while(!!(found = /\{\{\s*?>\s*?(.+?):(.+?)\s*?}}([\s\S]*?)\{\{\s*?\/>\s*?}}/g.exec(content))) { while(!!(found = /\{\{\s*?>\s*?(.+?):(.+?)\s*?}}([\s\S]*?)\{\{\s*?\/>\s*?}}/g.exec(content))) {
content = content.replace(found[0], await renderTemplate(await fetch(found[1].trim), { content = content.replace(found[0], await renderTemplate(await fetch(found[1].trim()), {
...data, ...data,
[found[2].trim()]: found[3], [found[2].trim()]: found[3],
}, fetch)); }, fetch));