fix: remarkTokenAST undefined `item` var -> `node`
parent
f4b24bdefe
commit
17a39e9c97
2
index.js
2
index.js
|
@ -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: {...}}
|
||||||
|
|
Loading…
Reference in New Issue