Merge pull request #14 from davorpa/bugfix/8

[HOTFIX-11]: undefined `item` var -> `node`
main
Eric Hellman 2022-09-25 14:56:29 -04:00 committed by GitHub
commit 3f476b9100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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: {...}}