This commit is contained in:
parent
18f1d05ba6
commit
4c82f6e31e
1 changed files with 4 additions and 15 deletions
19
broker.ts
19
broker.ts
|
@ -35,7 +35,7 @@ async function sendEmail(content: string) {
|
|||
const info = await transporter.sendMail({
|
||||
from: '"The Oracle" <the.oracle@holy.mountain>',
|
||||
to: "Christopher.Hase@telekom.com;test@mailhog.local",
|
||||
subject: "Your New Horoscope Is Ready",
|
||||
subject: "Your Horoscope Is Ready",
|
||||
text: content,
|
||||
html: html(content)
|
||||
});
|
||||
|
@ -104,8 +104,6 @@ function parse(input: string): Node {
|
|||
currentNode.value = line + "<br>";
|
||||
} else {
|
||||
currentNode.value = currentNode.value + line + "<br>";
|
||||
|
||||
//console.log("currentNode.value: " + currentNode.value); //TODO: zu viel Info!!!
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,19 +123,13 @@ function render(node: Node): string {
|
|||
|
||||
var outputHTML: string = "";
|
||||
|
||||
// type: "Root" | "Hexagram" | "Judgement" | "Images" | "ChangingLines" ;
|
||||
|
||||
|
||||
switch (node.type) {
|
||||
case "Root":
|
||||
return render(node.child!);
|
||||
case "Hexagram":
|
||||
//outputHTML = "<p><i>" + node.value + "</i></p>";
|
||||
|
||||
node.value = node.value?.replace("</h1>", "</h1><h3>"); //TODO: OK??
|
||||
//outputHTML = "<p style=\"font-size: 2rem;\">" + node.value + "</p>"; //TODO: OK??
|
||||
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: OK??
|
||||
|
||||
node.value = node.value?.replace("</h1>", "</h1><h3>");
|
||||
node.value = node.value?.replace("<br>", " --- ");
|
||||
outputHTML = "<p>" + node.value + "</h3></p>"; //TODO: maybe better: node.value = "<p>" + node.value + "</h3></p>";
|
||||
outputHTML = outputHTML + render(node.child!);
|
||||
|
||||
return outputHTML;
|
||||
|
@ -152,11 +144,8 @@ function render(node: Node): string {
|
|||
outputHTML = "<p>" + node.value + "</p>";
|
||||
outputHTML = outputHTML + render(node.child!);
|
||||
|
||||
//console.log(" " + node.type + " - outputHTML: " + outputHTML); //TODO: zu viel Info!!!
|
||||
|
||||
return outputHTML;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in a new issue