adding goto test command

This commit is contained in:
Dan 2026-01-19 18:48:07 +00:00
parent 901f3e5cdc
commit 1e024b4b2c
4 changed files with 176 additions and 84 deletions

View file

@ -149,9 +149,13 @@ class SceneManager {
continue;
}
// Text with optional className
// Text with optional className (supports html: true for HTML content)
if (block.text !== undefined) {
this._printText(block.text, block.className || "");
if (block.html) {
this._printHTML(block.text, block.className || "");
} else {
this._printText(block.text, block.className || "");
}
continue;
}
}
@ -172,6 +176,21 @@ class SceneManager {
}
}
// Print HTML with variable interpolation
_printHTML(html, className = "") {
// Support ${path} interpolation
const interpolated = html.replace(/\$\{([^}]+)\}/g, (match, path) => {
const value = this.state.get(path);
return value !== undefined ? String(value) : match;
});
if (className) {
this.adapter.printHTML(`<span class="${className}">${interpolated}</span>`);
} else {
this.adapter.printHTML(interpolated);
}
}
// Handle options/choices
async _handleOptions(scene) {
// Filter options based on conditions