Bookmarks Table of Contents Generator
This extension generates and keeps updated a comment at the top of your file containing a "table of contents" of all of your bookmarks, helping both others and yourself to learn and navigate larger files.
NOTE: you must have the following for this extension to work:
PLEASE NOTE: this extension is modifying your document in order to update the table of contents comment. The extension will tell you exactly what lines it is updating. Please take percaution, and note how exactly the extension is currently detecting the table of contents in order to not induce unintended behavior.
How it works: The program looks for two separate occurances of the "separator" string (it can be preceded by up to 5 characters to account for comments). If it finds two, then it deletes everything inbetween (inclusive) to update the new table of contents.
You can modify the following through settings:
Please make sure you review the notice. There will inevitably be some edge cases in the existing table of contents detection and deletion; I have tried to cover them all, but edge cases may remain.
Fixed some language-related compatibility issues with comments, added notice.
Removed explicit dependency on Bookmarks to allow loading into remote session, instead added error message if no bookmarks detected.