create html part 13
All checks were successful
ci / build (push) Successful in 1m7s

This commit is contained in:
Christopher Hase 2025-03-27 14:23:36 +01:00
parent 768c91e0b3
commit 1d0955c17d

View file

@ -134,40 +134,27 @@ function render(node: Node): string {
return "";
}
console.log("Render node " + node.type);
console.log("Render node 3 " + node.type);
var outputHTML: string = "";
// type: "Root" | "Hexagram" | "Judgement" | "Images" | "ChangingLines" ;
switch (node.type) {
case "Root":
return render(node.child!);
//case "Hexagram":
default:
outputHTML = "<p>" + node.value + "</p>";
outputHTML.concat(render(node.child!));
//outputHTML.concat(render(node.child!));
outputHTML = outputHTML + render(node.child!);
console.log(" " + node.type + " - outputHTML: " + outputHTML);
return outputHTML;
}
//return "";
}
/*
//TODO: process every line...
function processLine(inputLine: string): string {
if (inputLine.startsWith('Hexagram')) {
return processLineHexagram(inputLine);
}
//return input + "\n";
//"<p> ${content} </p>"
return "<p>" + inputLine + "</p>";
}
function processLineHexagram(inputLine: string): string {
return "<p>" + inputLine + "</p>";
}*/