hieroglyph
hieroglyph copied to clipboard
slide level-0
https://github.com/nyergler/hieroglyph/blob/1ef062fad5060006566f8d6bd3b5a231ac7e0488/src/hieroglyph/writer.py#L349
I believe that line of code is a mistake. With multi-file projects section_level goes below one / is one less than the correct value after each file is processed. Removing that line eliminates the problem.
I will happily provide a pull request or an example.
Ah, makes sense; I suppose that should be something like self.section_level = max(0, self.section_level - 1)
?
A PR would be fantastic, thanks!
I still suspect the line should be entirely removed; that section_level should not be adjusted at that point.
What is the intention? Why should section_level be adjusted in visit_start_of_file?
I believe the intention was that when you had multi-file slide decks that the headings would be "right" going from one file to the next. I'd have to look more closely at the commit to figure out if the test gives more context.