Increase token max length to fix code not highlighted (#2629)

This commit is contained in:
Greg Bergé
2024-12-13 13:16:55 +01:00
committed by GitHub
parent 6b5d7e6057
commit c73e07d42d
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'gitbook': patch
---
Increase token max length to fix code not highlighted
@@ -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;