Skip to content

Commit

Permalink
fix: build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lelouch77 authored Dec 1, 2020
1 parent db0776e commit 5593dc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/html-to-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ function getSectionHeaders(markdown) {
let currentSection = null
const result = []
let contentsAcc = ''

const emitCurrent = () => {
const ref = select('.anchor', currentSection)
result.push({
title: toText(currentSection).replace(/^#+/, '').replace(/#$/, ''),
ref: select('.anchor', currentSection)?.properties.id,
ref: ref ? ref.properties.id : '#',
content: contentsAcc,
})
contentsAcc = ''
Expand Down

0 comments on commit 5593dc2

Please sign in to comment.