Skip to content

Commit

Permalink
docs: Update Monaco syntax highlighting configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hddhyq committed Apr 17, 2024
1 parent ac1167a commit 9a5ea59
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/packages/monaco.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ monaco.languages.register({ id: 'vue' })
monaco.languages.register({ id: 'typescript' })
monaco.languages.register({ id: 'javascript' })

// Register the themes from Shiki, and provide syntax highlighting for Monaco. // [!code highlight:6]
// Custom token parsing configuration can be defined.
shikiToMonaco(highlighter, monaco, {
tokenizeMaxLineLength: 20000,
tokenizeTimeLimit: 500
})
// Register the themes from Shiki, and provide syntax highlighting for Monaco. // [!code highlight:2]
shikiToMonaco(highlighter, monaco)

// Create the editor
const editor = monaco.editor.create(document.getElementById('container'), {
Expand Down

0 comments on commit 9a5ea59

Please sign in to comment.