markdown-preview-enhanced icon indicating copy to clipboard operation
markdown-preview-enhanced copied to clipboard

TOC generation does not work with depthFrom and depthTo on save

Open majiang opened this issue 2 years ago • 0 comments

When I save a file with <!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=3 orderedList=false} -->,

  • the TOC in the saved file is full (depthFrom=1 depthTo=6)
  • the TOC in editor is expected TOC, with "Table of Contentns (out of date)"
  • so I can never have expected TOC saved
Visual Studio Code: 1.65.2 (user setup)
  Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
  Date: 2022-03-10T14:33:55.248Z (2 wks ago)
  Electron: 13.5.2
  Chromium: 91.0.4472.164
  Node.js: 14.16.0
  V8: 9.1.269.39-electron.0
  OS: Windows_NT x64 10.0.19044

Markdown Preview Enhanced: v0.6.2

It seems rather randomly happening when I tried to

  • restart VS Code,
  • reopen Preview, or
  • remove and recreate TOC, and then edit depthFrom and depthTo.

majiang avatar Mar 29 '22 09:03 majiang