From 3f72e3550c873b0e9daf38a1423efc2b64c16425 Mon Sep 17 00:00:00 2001 From: Steven Hall Date: Sat, 13 Apr 2024 18:49:34 +0100 Subject: [PATCH] more logging --- .../DocumentView/CodeBlock/highlight.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/DocumentView/CodeBlock/highlight.ts b/src/components/DocumentView/CodeBlock/highlight.ts index 2d12384582..dd5366166e 100644 --- a/src/components/DocumentView/CodeBlock/highlight.ts +++ b/src/components/DocumentView/CodeBlock/highlight.ts @@ -66,23 +66,19 @@ export async function highlight(block: DocumentBlockCode): Promise { + const result = lines.map((tokens, index) => { tokenCount += tokens.length; const lineBlock = block.nodes[index]; const result: HighlightToken[] = []; @@ -98,6 +94,7 @@ export async function highlight(block: DocumentBlockCode): Promise 0) { + console.log(`tokens.length: ${tokens.length}`) result.push(...matchTokenAndInlines(eatToken, inlines)); } @@ -108,6 +105,12 @@ export async function highlight(block: DocumentBlockCode): Promise