fix: remarkTokenAST undefined `item` var -> `node`

pull/14/head
David Ordás 2022-09-25 01:29:29 +02:00
parent f4b24bdefe
commit 17a39e9c97
No known key found for this signature in database
GPG Key ID: 6FD751229911593E
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ function remarkTokenAST(node) {
case "emphasis": // {type: 'emphasis', children: [...], position: {...}} case "emphasis": // {type: 'emphasis', children: [...], position: {...}}
return Strings.wrap("{{text}}", "_"); return Strings.wrap("{{text}}", "_");
case "heading": // {type: 'heading', depth: 1, children: [...], position: {...}} 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: {...}} case "image": // {type: 'image', title: '...', url: '...', alt: '...', position: {...}}
return "![{{text}}]({{url}})"; return "![{{text}}]({{url}})";
case "inlineCode": // {type: 'inlineCode', value: '...', position: {...}} case "inlineCode": // {type: 'inlineCode', value: '...', position: {...}}