@cloudbase/weda-ui 3.9.7 → 3.9.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -30,7 +30,9 @@ export const WdMarkdown = forwardRef(function WdMarkdown({ value = '', options,
|
|
|
30
30
|
try {
|
|
31
31
|
return hljs.highlight(lang, str).value;
|
|
32
32
|
}
|
|
33
|
-
catch (
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('init markdown error', error);
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
return ''; // 使用额外的默认转义
|
|
36
38
|
},
|
|
@@ -80,7 +82,8 @@ export const WdMarkdown = forwardRef(function WdMarkdown({ value = '', options,
|
|
|
80
82
|
return () => {
|
|
81
83
|
destroy();
|
|
82
84
|
};
|
|
83
|
-
|
|
85
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
86
|
+
}, []);
|
|
84
87
|
const [html, setHtml] = useState('');
|
|
85
88
|
useEffect(() => {
|
|
86
89
|
if (mdInstance) {
|