I noticed that if I create a TOC for a Bear note and then make changes to the note headers, if I rerun the script it does not update the TOC and says the Note already has headers.
I took a peek at the code and I think the key place in the code is here
|
if has_table_of_contents(md_text): |
|
print('[WARNING]: \'{}\' already has a Table of Contents, Ignoring...'.format(title)) |
|
continue |
I propose to have logic in that if statement to delete the TOC and then continue recreating it so that if there are any changes they get accounted for.
I noticed that if I create a TOC for a Bear note and then make changes to the note headers, if I rerun the script it does not update the TOC and says the Note already has headers.
I took a peek at the code and I think the key place in the code is here
markdown-github-bear-toc/markdowntoc/markdowntoc.py
Lines 210 to 212 in 0603731
I propose to have logic in that if statement to delete the TOC and then continue recreating it so that if there are any changes they get accounted for.