@@ -55,7 +55,7 @@ export const readerRoute = {
|
||||
if (!window) {
|
||||
return
|
||||
}
|
||||
return callWindowExpose(window).toast.error(error.message, {
|
||||
void callWindowExpose(window).toast.error(error.message, {
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -57,6 +57,9 @@ export const ShikiHighLighter: FC<ShikiProps> = (props) => {
|
||||
|
||||
function guessLanguage() {
|
||||
return tipcClient?.detectCodeStringLanguage({ codeString: code }).then((result) => {
|
||||
if (!result) {
|
||||
return
|
||||
}
|
||||
if (bundledLanguagesKeysSet?.has(result.languageId)) {
|
||||
setCurrentLanguage(result.languageId)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user