Skip to content

Commit

Permalink
Log
Browse files Browse the repository at this point in the history
  • Loading branch information
emmerich committed Apr 13, 2024
1 parent 6270353 commit 76ee194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/DocumentView/CodeBlock/highlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ export async function highlight(block: DocumentBlockCode): Promise<HighlightLine
return plainHighlighting(block);
}


const inlines: InlineIndexed[] = [];
const code = getPlainCodeBlock(block, inlines);
console.log(`block has ${block.nodes.length} lines, ${code.length} characters ${inlines.length} inlines`);

inlines.sort((a, b) => {
return a.start - b.start;
Expand All @@ -49,7 +51,6 @@ export async function highlight(block: DocumentBlockCode): Promise<HighlightLine
const lines = highlighter.codeToTokensBase(code, {
lang: langName,
tokenizeMaxLineLength: 120,
includeExplanation: false
});
let currentIndex = 0;

Expand Down

0 comments on commit 76ee194

Please sign in to comment.