Skip to content

Commit

Permalink
Increase token max length to fix code not highlighted (#2629)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge authored Dec 13, 2024
1 parent 6b5d7e6 commit c73e07d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/ten-parrots-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Increase token max length to fix code not highlighted
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function highlight(block: DocumentBlockCode): Promise<HighlightLine

const lines = highlighter.codeToTokensBase(code, {
lang: langName,
tokenizeMaxLineLength: 120,
tokenizeMaxLineLength: 400,
});

let currentIndex = 0;
Expand Down

0 comments on commit c73e07d

Please sign in to comment.