From 17a39e9c972f22a7ae3d801d091cfb09cfe7db86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ord=C3=A1s?= <3125580+davorpa@users.noreply.github.com> Date: Sun, 25 Sep 2022 01:29:29 +0200 Subject: [PATCH] fix: remarkTokenAST undefined `item` var -> `node` --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 25ec128..2048b9d 100644 --- a/index.js +++ b/index.js @@ -139,7 +139,7 @@ function remarkTokenAST(node) { case "emphasis": // {type: 'emphasis', children: [...], position: {...}} return Strings.wrap("{{text}}", "_"); case "heading": // {type: 'heading', depth: 1, children: [...], position: {...}} - return ["#".repeat(item.depth || 0), "{{text}}"].join(""); + return ["#".repeat(node.depth || 0), "{{text}}"].join(""); case "image": // {type: 'image', title: '...', url: '...', alt: '...', position: {...}} return "![{{text}}]({{url}})"; case "inlineCode": // {type: 'inlineCode', value: '...', position: {...}}