From 7e7af068063050ceba0b2d83d79cb5de645773c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 3 Jun 2021 09:30:41 +0200 Subject: [PATCH] add logging --- .../extension-code-block-lowlight/src/lowlight-plugin.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts index 25e24e6d..02295ea6 100644 --- a/packages/extension-code-block-lowlight/src/lowlight-plugin.ts +++ b/packages/extension-code-block-lowlight/src/lowlight-plugin.ts @@ -37,6 +37,12 @@ function getDecorations({ doc, name, lowlight }: { doc: ProsemirrorNode, name: s ? lowlight.highlight(language, block.node.textContent).children : lowlight.highlightAuto(block.node.textContent).children + console.log({ + lowlight, + languages, + nodes, + }) + parseNodes(nodes).forEach(node => { const to = from + node.text.length