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:
@@ -22,6 +22,7 @@ import { getRandomFallbackForestComment } from "../companion/fallbacks";
|
||||
import type { CompanionType, ForestElement } from "../types";
|
||||
import { playRewardSound } from "../audio/sounds";
|
||||
import { speakText } from "../audio/speech";
|
||||
import { renderInlineMarkdown } from "../utils/markdown";
|
||||
|
||||
// --- Element types for random selection ---
|
||||
|
||||
@@ -204,7 +205,7 @@ export async function initRewardScreen(
|
||||
playRewardSound();
|
||||
|
||||
// 7. Show companion comment + speak it aloud
|
||||
companionTextEl.textContent = comment;
|
||||
companionTextEl.innerHTML = renderInlineMarkdown(comment);
|
||||
speakText(comment);
|
||||
|
||||
// 8. Wire buttons
|
||||
|
||||
Reference in New Issue
Block a user