feat(quick-260329-ton): replace textContent with innerHTML + renderInlineMarkdown at all AI-text insertion points
- src/app.ts: greeting text now renders inline markdown - src/ui/screens.ts: letter intro text now renders inline markdown - src/forest/reward.ts: forest comment now renders inline markdown - All 3 sites use innerHTML with XSS-safe renderInlineMarkdown
This commit is contained in:
+2
-1
@@ -1,6 +1,7 @@
|
||||
import { speakText } from "./audio/speech";
|
||||
import { companions } from "./companion/characters";
|
||||
import { getGreeting } from "./companion/companion";
|
||||
import { renderInlineMarkdown } from "./utils/markdown";
|
||||
import { initRewardScreen, startPreGeneration } from "./forest/reward";
|
||||
import { initForestScreen, renderForestScene } from "./forest/scene";
|
||||
import { getProgress, openDB, saveProgress } from "./storage/db";
|
||||
@@ -224,7 +225,7 @@ export async function initApp(): Promise<void> {
|
||||
|
||||
// Fetch greeting async (shows immediately with avatar, text fills in)
|
||||
getGreeting(progress.selectedCharacter, db).then((text) => {
|
||||
textEl.textContent = text;
|
||||
textEl.innerHTML = renderInlineMarkdown(text);
|
||||
speakText(text);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user