Fix markdown tooltips treating Rust type labels as HTML tags

Closes #3520, a regression introduced in #3488.
This commit is contained in:
Keavon Chambers 2025-12-22 15:23:40 -08:00
parent 11e2882cb2
commit 415d4b578a
2 changed files with 4 additions and 1 deletions

View File

@ -566,6 +566,7 @@
min={0} min={0}
max={255} max={255}
minWidth={1} minWidth={1}
displayDecimalPlaces={0}
tooltipLabel={{ r: "Red Channel", g: "Green Channel", b: "Blue Channel" }[channel]} tooltipLabel={{ r: "Red Channel", g: "Green Channel", b: "Blue Channel" }[channel]}
tooltipDescription="Integers 0255." tooltipDescription="Integers 0255."
/> />

View File

@ -36,8 +36,10 @@
function parseMarkdown(markdown: string | undefined): string | undefined { function parseMarkdown(markdown: string | undefined): string | undefined {
if (!markdown) return undefined; if (!markdown) return undefined;
let text = markdown.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
return ( return (
markdown text
// .split("\n") // .split("\n")
// .map((line) => line.trim()) // .map((line) => line.trim())
// .join("\n") // .join("\n")