perf: markdown redraw

This commit is contained in:
archer
2023-06-19 16:50:14 +08:00
parent 3b515c3c2d
commit 1d236f87ae
11 changed files with 271 additions and 458 deletions

View File

@@ -115,12 +115,6 @@ export const voiceBroadcast = ({ text }: { text: string }) => {
};
};
export const formatLinkText = (text: string) => {
const httpReg =
/(http|https|ftp):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?/gi;
return text.replace(httpReg, ` $& `);
};
export const getErrText = (err: any, def = '') => {
const msg = typeof err === 'string' ? err : err?.message || def || '';
msg && console.log('error =>', msg);