Skip to content

Commit

Permalink
fix: export highlighter function and rename in composable
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jan 17, 2023
1 parent 98a4e8c commit 406fe18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composables/shiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const shiki = ref<Highlighter>()
const registeredLang = ref(new Map<string, boolean>())
let shikiImport: Promise<void> | undefined

function useHighlighter(lang: Lang) {
export function useHighlighter(lang: Lang) {
if (!shikiImport) {
shikiImport = import('shiki-es')
.then(async (r) => {
Expand Down
2 changes: 1 addition & 1 deletion composables/tiptap/shiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function getDecorations({
let from = block.pos + 1
const language = block.node.attrs.language

const shiki = useHightlighter(language)
const shiki = useHighlighter(language)

if (!shiki)
return
Expand Down

0 comments on commit 406fe18

Please sign in to comment.