const regex_italic = /\*(.*?)\*/g;
const regex_code = /`(.*?)`/g;
const regex_curly_brackets = /\{(.*?)\}/g;
export function style_formatted_text(formatted_text: string | null): string {
if (!formatted_text) return "";
return formatted_text
.replace(regex_italic, "$1")
.replace(
regex_code,
"$1
"
)
.replace(
regex_curly_brackets,
"$1
"
)
.replace(
/\[(.*?)\]\((.*?)\)/g,
"$1"
);
}