@orglnd/org-transform
Advanced tools
Comparing version 0.0.1-alpha.0 to 0.1.0-alpha.0
@@ -20,9 +20,9 @@ "use strict"; | ||
function walkDocument(node, children) { | ||
if (node.type === `Section`) { | ||
if (node.type === `section`) { | ||
children.push(Object.assign({}, node, { | ||
children: node.children.filter(node => node.type !== `Headline`) | ||
children: node.children.filter(node => node.type !== `headline`) | ||
})); | ||
} | ||
if (node.type === `Headline`) { | ||
if (node.type === `headline`) { | ||
children.push(Object.assign({}, node, { | ||
@@ -33,7 +33,7 @@ children: [] | ||
if (node.type === `Keyword` && !foundFirstHeadline) { | ||
if (node.type === `keyword` && !foundFirstHeadline) { | ||
meta[node.key] = node.value; | ||
} | ||
if (node.type === `FootnoteDefinition`) { | ||
if (node.type === `footnote_definition`) { | ||
footnotes[footnoteIdx] = node; | ||
@@ -46,3 +46,3 @@ footnoteIdx++; | ||
body: { | ||
type: `Document`, | ||
type: `document`, | ||
children | ||
@@ -49,0 +49,0 @@ }, |
{ | ||
"name": "@orglnd/org-transform", | ||
"version": "0.0.1-alpha.0", | ||
"version": "0.1.0-alpha.0", | ||
"main": "lib/html.js", | ||
@@ -16,3 +16,4 @@ "license": "MIT", | ||
"jest-cli": "^24.8.0" | ||
} | ||
}, | ||
"gitHead": "0295762a785cbf742dead720cd38470ee97041b1" | ||
} |
@@ -21,6 +21,6 @@ // @flow | ||
function walkDocument(node, children) { | ||
if (node.type === `Section`) { | ||
if (node.type === `section`) { | ||
children.push( | ||
Object.assign({}, node, { | ||
children: node.children.filter(node => node.type !== `Headline`), | ||
children: node.children.filter(node => node.type !== `headline`), | ||
}) | ||
@@ -30,3 +30,3 @@ ); | ||
if (node.type === `Headline`) { | ||
if (node.type === `headline`) { | ||
children.push( | ||
@@ -39,7 +39,7 @@ Object.assign({}, node, { | ||
if (node.type === `Keyword` && !foundFirstHeadline) { | ||
if (node.type === `keyword` && !foundFirstHeadline) { | ||
meta[node.key] = node.value; | ||
} | ||
if (node.type === `FootnoteDefinition`) { | ||
if (node.type === `footnote_definition`) { | ||
footnotes[footnoteIdx] = node; | ||
@@ -52,3 +52,3 @@ footnoteIdx++; | ||
body: { | ||
type: `Document`, | ||
type: `document`, | ||
children, | ||
@@ -55,0 +55,0 @@ }, |
Sorry, the diff of this file is not supported yet
144169