This commit is contained in:
Morten Olsen
2025-05-18 18:43:30 +02:00
commit bc92c91ff8
26 changed files with 5001 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { type ExecutionHandler } from '../execution.js';
import Handlebars from "handlebars";
const textHandler: ExecutionHandler = ({
addStep,
node,
}) => {
if (node.type === 'text') {
addStep({
type: 'parse-text',
node,
action: async ({ context }) => {
const template = Handlebars.compile(node.value);
const content = template(context);
node.value = content;
},
})
}
}
export { textHandler };