diff --git a/src/components/chart/index.tsx b/src/components/chart/index.tsx index d978ef9a..70e6acf6 100644 --- a/src/components/chart/index.tsx +++ b/src/components/chart/index.tsx @@ -15,21 +15,8 @@ interface OuterbaseChartProps { } const TextComponent = ({ value }: OuterbaseChartProps) => { - let markdown = value.params.options?.text ?? ""; + const markdown = value.params.options?.text ?? ""; - // Bold (**text** or __text__) - markdown = markdown.replace(/\*\*(.*?)\*\*/g, "$1"); - markdown = markdown.replace(/__(.*?)__/g, "$1"); - - // Italic (*text* or _text_) - markdown = markdown.replace(/\*(.*?)\*/g, "$1"); - markdown = markdown.replace(/_(.*?)_/g, "$1"); - - // Underline (__text__) - markdown = markdown.replace(/~~(.*?)~~/g, "$1"); - - // Line break (double space followed by a newline) - markdown = markdown.replace(/ {2}\n/g, "
"); return (

{ }} className="flex-1 self-start text-neutral-900 dark:text-neutral-100" > - + {markdown}

);