Skip to content

Feature Request: Updating Existing TOC #13

Description

@rzu-7

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions