alanwalk / markdown-toc

MarkdownTOC(Table Of Contents) Plugin for Visual Studio Code.
MIT License
141 stars 111 forks source link

The "depthFrom" property won't work if update on save is true #74

Open Triple-Z opened 5 years ago

Triple-Z commented 5 years ago

I have written the settings for the markdown file that the table of content code is the following.

<!-- TOC depthFrom:2 -->

- [LeetCode](#leetcode)
  - [Problems](#problems)
    - [Algorithms](#algorithms)
  - [License](#license)

<!-- /TOC -->

However, the depthFrom property doesn't work with "Update on save". I have updated it manually and it can generate the right table of content, but after I pressed the Ctrl + s keys, the table of content would be automatically updated to the former version(with heading 1).

akshaybabloo commented 5 years ago

I have the same problem. Have you tried debugging it by any chance?

seflue commented 4 years ago

I can confirm this problem, also for depthTo - updateOnSave seems to ignore file specific settings.

seflue commented 4 years ago

I've played around with the plugin settings and updateOnSave seems to ignore the settings at all - wether they're defined in the settings.json or in the md file which is saved.

martypowell commented 4 years ago

I have the same problem. Have you tried debugging it by any chance?

+1

mcornella commented 3 years ago

Can't reproduce after #92 is applied so I'm assuming it's fixed, can you try it?