alanwalk / markdown-toc

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

Update on save ("markdown-toc.updateOnSave") setting not working #59

Open ahmetb opened 6 years ago

ahmetb commented 6 years ago

I set "markdown-toc.updateOnSave": false and restarted vscode.

Let's say I have thic ToC generated:

- [Authentication](#authentication)
    - [Exposing credentials to the build](#exposing-credentials-to-the-build)
  - [SSH authentication (Git)](#ssh-authentication-git)
  - [Basic authentication (Git)](#basic-authentication-git)
  - [Basic authentication (Docker)](#basic-authentication-docker)
    - [Guiding credential selection](#guiding-credential-selection)
  - [Implementation detail](#implementation-detail)
    - [Docker `basic-auth`](#docker-basic-auth)
    - [Git `basic-auth`](#git-basic-auth)
    - [Git `ssh-auth`](#git-ssh-auth)
    - [Least privilege](#least-privilege)

now I delete first two lines:

  - [SSH authentication (Git)](#ssh-authentication-git)
  - [Basic authentication (Git)](#basic-authentication-git)
  - [Basic authentication (Docker)](#basic-authentication-docker)
    - [Guiding credential selection](#guiding-credential-selection)
  - [Implementation detail](#implementation-detail)
    - [Docker `basic-auth`](#docker-basic-auth)
    - [Git `basic-auth`](#git-basic-auth)
    - [Git `ssh-auth`](#git-ssh-auth)
    - [Least privilege](#least-privilege)

and save, it saves as is (expected).

Now I unindent these to remove the left padding spaces:

- [SSH authentication (Git)](#ssh-authentication-git)
- [Basic authentication (Git)](#basic-authentication-git)
- [Basic authentication (Docker)](#basic-authentication-docker)
  - [Guiding credential selection](#guiding-credential-selection)
- [Implementation detail](#implementation-detail)
  - [Docker `basic-auth`](#docker-basic-auth)
  - [Git `basic-auth`](#git-basic-auth)
  - [Git `ssh-auth`](#git-ssh-auth)
  - [Least privilege](#least-privilege)

I save, and Markdown TOC plugin regenerates this TOC and I'm back to the initial code snippet I pasted above (unexpected) despite updateOnSave was disabled.

(plugin version 1.5.6)

occultskyrong commented 6 years ago

In markdown file

config like this ...

<!-- TOC depthFrom:2 updateOnSave:false -->

also not working

occultskyrong commented 5 years ago

i think it's something wrong with 'Markdown All in One' Just search "Markdown › Extension › Toc: Update On Save" in "Extension" config Set it "false" , problem solving

mcornella commented 4 years ago

Can't reproduce in #92.