Skip to content

Commit

Permalink
Folia: insert metadata in root instead of first child
Browse files Browse the repository at this point in the history
  • Loading branch information
PrinsINT committed Sep 12, 2024
1 parent 761ce3f commit cc2f019
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class FoliaLayerMerger(

// add headers
// typically we expect just 1 root node.
FoliaMetadata(reader!!.xmlDoc, reader!!.xmlDoc.firstChild, this).write()
FoliaMetadata(reader!!.xmlDoc, reader!!.xmlDoc.documentElement, this).write()

// Delete the marked notes
deleteList.forEach { if (it.parentNode != null) it.parentNode.removeChild(it) }
Expand All @@ -41,4 +41,4 @@ class FoliaLayerMerger(
result.writeText(BLFXMLParser.xmlToString(false, reader!!.xmlDoc))
return FoliaFile(result)
}
}
}

0 comments on commit cc2f019

Please sign in to comment.