You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "test-mdutils.py", line 4, in <module>
mdFile.new_header(level=2, title='Atx Header 2')
File "/opt/anaconda3/lib/python3.8/site-packages/mdutils/mdutils.py", line 113, in new_header
self.__add_new_item_table_of_content(level, title)
File "/opt/anaconda3/lib/python3.8/site-packages/mdutils/mdutils.py", line 130, in __add_new_item_table_of_content
curr = curr[-1]
IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
If you are okay with the header not being included in the table of contents, a work around to have the code run is to set add_table_of_contents="n", then the code should run without error (although possibly not with the fully desired behavior).
Describe the bug
Cannot create a file with a single header at level 2 (without having a level 1)
To Reproduce
Expected behavior
Markdown file with a level 2 header
Desktop (please complete the following information):
Additional context
Traceback:
The text was updated successfully, but these errors were encountered: