mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Fix markdown tooltips treating Rust type labels as HTML tags
Closes #3520, a regression introduced in #3488.
This commit is contained in:
@@ -566,6 +566,7 @@
|
||||
min={0}
|
||||
max={255}
|
||||
minWidth={1}
|
||||
displayDecimalPlaces={0}
|
||||
tooltipLabel={{ r: "Red Channel", g: "Green Channel", b: "Blue Channel" }[channel]}
|
||||
tooltipDescription="Integers 0–255."
|
||||
/>
|
||||
|
||||
@@ -36,8 +36,10 @@
|
||||
function parseMarkdown(markdown: string | undefined): string | undefined {
|
||||
if (!markdown) return undefined;
|
||||
|
||||
let text = markdown.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
||||
|
||||
return (
|
||||
markdown
|
||||
text
|
||||
// .split("\n")
|
||||
// .map((line) => line.trim())
|
||||
// .join("\n")
|
||||
|
||||
Reference in New Issue
Block a user