refactor: Upgrade to Fusebox 2.0

This commit is contained in:
NGPixel
2017-05-04 22:41:33 -04:00
parent 3e1c4a086c
commit 3fa941ce19
7 changed files with 149 additions and 51 deletions

View File

@@ -112,10 +112,10 @@ const parseTree = (content) => {
let content = ''
let anchor = ''
if (heading.children && heading.children.length > 0 && heading.children[0].type === 'link_open') {
content = removeMarkdown(heading.children[1].content)
content = mdRemove(heading.children[1].content)
anchor = _.kebabCase(content)
} else {
content = removeMarkdown(heading.content)
content = mdRemove(heading.content)
anchor = _.kebabCase(heading.children.reduce((acc, t) => acc + t.content, ''))
}