Fix markdown tooltips treating Rust type labels as HTML tags
Closes #3520, a regression introduced in #3488.
This commit is contained in:
parent
11e2882cb2
commit
415d4b578a
|
|
@ -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 0–255."
|
tooltipDescription="Integers 0–255."
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -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, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
markdown
|
text
|
||||||
// .split("\n")
|
// .split("\n")
|
||||||
// .map((line) => line.trim())
|
// .map((line) => line.trim())
|
||||||
// .join("\n")
|
// .join("\n")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue