Skip to content

Commit

Permalink
Merge pull request #31 from ugogon/fixnochildren
Browse files Browse the repository at this point in the history
fix if node has no child
  • Loading branch information
timlrx committed Oct 10, 2023
2 parents 82f0b73 + c81d904 commit 9f7849b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const rehypeCitationGenerator = (Cite) => {
if (
!options.suppressBibliography &&
(node.tagName === 'p' || node.tagName === 'div') &&
node.children.length >= 1 &&
node.children[0].value === '[^ref]'
) {
parent.children[idx] = biblioNode
Expand Down

0 comments on commit 9f7849b

Please sign in to comment.