Skip to content

Commit

Permalink
💄 style: add error output when shiki failed to highlight (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx authored Dec 13, 2024
1 parent bf63538 commit ef6729e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useHighlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export const useHighlight = (text: string, lang: string, isDarkMode: boolean) =>
transformerNotationErrorLevel(),
],
});
} catch {
} catch (e) {
console.error("shiki Highlight error:", e)
return text;
}
});
Expand Down

0 comments on commit ef6729e

Please sign in to comment.