Skip to content

Commit

Permalink
feat: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Jul 20, 2024
1 parent 7a10e10 commit 423b01f
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ const ShikiDetail = ({ defaultValue, filecoverage, theme }) => {
.then((res) => {
setContent(res);
})
.catch(() => {
console.log('覆盖率着色失败');
// codeToHtml(defaultValue, {
// lang: 'javascript',
// theme: theme === 'light' ? 'light-plus' : 'tokyo-night',
// }).then((r) => {
// setContent(r);
// });
.catch((err) => {
console.log('覆盖率着色失败', err);
codeToHtml(defaultValue, {
lang: 'javascript',
theme: theme === 'light' ? 'light-plus' : 'tokyo-night',
}).then((r) => {
setContent(r);
});
});
return (
<div className={'px-[12px] overflow-x-auto w-full'}>
Expand Down

0 comments on commit 423b01f

Please sign in to comment.