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
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
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.
The text was updated successfully, but these errors were encountered:
I've seen other mechanisms where there is an explicit TOC marker that the user can insert in the place they want the TOC to be placed. Then on re-run that same marker (in a comment) is located and then deleting the existing links/TOC is considered safe.
I'm not using this tool, but considering options (my current use case is html generation so currently experimenting with TOC generation tweaks in the markdown to html phase). If I end up using this, I'll likely need/want this functionality (and would implementing it myself).
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.
The text was updated successfully, but these errors were encountered: