File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use client' ;
2
-
3
- import { transformerNotationHighlight } from '@shikijs/transformers' ;
4
2
import { Components , toJsxRuntime } from 'hast-util-to-jsx-runtime' ;
5
3
import type { JSX } from 'react' ;
6
4
import { Fragment , useLayoutEffect , useState } from 'react' ;
7
5
import { jsx , jsxs } from 'react/jsx-runtime' ;
8
6
import type { BundledLanguage } from 'shiki/bundle/web' ;
9
7
import { CodeBlockComponent } from './Code' ;
8
+ import { transformerNotationHighlight } from '@shikijs/transformers' ;
10
9
11
10
const highlight = async (
12
11
code : string ,
Original file line number Diff line number Diff line change 1
- import type { JSX } from 'react' ;
2
- import type { BundledLanguage , DecorationItem } from 'shiki' ;
3
- import { codeToHast } from 'shiki' ;
1
+ import { transformerNotationHighlight } from '@shikijs/transformers' ;
4
2
import { Components , toJsxRuntime } from 'hast-util-to-jsx-runtime' ;
3
+ import type { JSX } from 'react' ;
5
4
import { Fragment } from 'react' ;
6
5
import { jsx , jsxs } from 'react/jsx-runtime' ;
7
- import './Code.css' ;
6
+ import type { BundledLanguage } from 'shiki' ;
7
+ import { codeToHast } from 'shiki' ;
8
8
import { CodeBlockComponent } from './Code' ;
9
- import { transformerNotationHighlight } from '@shikijs/transformers ';
9
+ import './Code.css ';
10
10
11
11
interface Props {
12
12
children : string ;
You can’t perform that action at this time.
0 commit comments