@lobehub/ui 1.168.19 → 1.168.20
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.
- package/es/hooks/useHighlight.js +1 -1
- package/package.json +1 -1
package/es/hooks/useHighlight.js
CHANGED
|
@@ -80,7 +80,7 @@ export var useHighlight = function useHighlight(text, lang, enableTransformer) {
|
|
|
80
80
|
// 长文本使用 hash
|
|
81
81
|
var hash = text.length < MD5_LENGTH_THRESHOLD ? text : Md5.hashStr(text);
|
|
82
82
|
return [matchedLanguage, isDarkMode ? 'd' : 'l', hash].join('-');
|
|
83
|
-
}, [matchedLanguage, isDarkMode]);
|
|
83
|
+
}, [text, matchedLanguage, isDarkMode]);
|
|
84
84
|
|
|
85
85
|
// 使用SWR获取高亮HTML
|
|
86
86
|
return useSWR(cacheKey, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|