bajo-template 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bajo/intl/en-US.json
CHANGED
package/bajo/intl/id.json
CHANGED
|
@@ -71,8 +71,8 @@ export async function _renderString (content, locals = {}, opts = {}) {
|
|
|
71
71
|
const fullTitle = locals.page.title ? `${locals.page.title} - ${appTitle}` : appTitle
|
|
72
72
|
locals.page.fullTitle = locals.fullTitle ?? fullTitle
|
|
73
73
|
}
|
|
74
|
-
content = await
|
|
75
|
-
return await
|
|
74
|
+
content = await this.compile(content, locals, { lang: opts.lang, ttl: this.config.cache.maxAgeDur })
|
|
75
|
+
return await handleInclude.call(this, content, locals, opts)
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
async function renderString (content, locals = {}, opts = {}) {
|
package/bajo/method/render.js
CHANGED
|
@@ -19,7 +19,7 @@ function _detectLoop (tpl, file, opts) {
|
|
|
19
19
|
const { last } = this.app.bajo.lib._
|
|
20
20
|
if (opts.groupId) {
|
|
21
21
|
if (loopDetector[opts.groupId]) {
|
|
22
|
-
if (last(loopDetector[opts.groupId].file) === file) throw this.
|
|
22
|
+
if (last(loopDetector[opts.groupId].file) === file && path.basename(file)[0] !== '~') throw this.error('loopDetected%s%s', tpl, file)
|
|
23
23
|
loopDetector[opts.groupId].file.push(file)
|
|
24
24
|
} else {
|
|
25
25
|
loopDetector[opts.groupId] = {
|