Make the new item function better at guessing header level of new files

This commit is contained in:
Veronica Berglyd Olsen
2022-06-05 17:41:29 +02:00
parent 88976d6800
commit 92924b3288
4 changed files with 17 additions and 4 deletions
+5
View File
@@ -502,6 +502,11 @@ class NWIndex:
"""
return self._itemIndex.mainItemHeader(tHandle)
def getHandleHeaderIntLevel(self, tHandle):
"""Get the integer header level of the first header of a handle.
"""
return H_LEVEL.get(self._itemIndex.mainItemHeader(tHandle), 0)
def getTableOfContents(self, maxDepth, skipExcl=True):
"""Generate a table of contents up to a maximum depth.
"""