Open TrevorSayre opened 4 years ago
I noticed there is a similar comment here: https://github.com/huntertran/markdown-toc/issues/40#issuecomment-691685368
It states that:
the extension cannot differentiate the first
<!--TOC orderedlist:true-->
with<!-- TOC ignore:true -->
Perhaps a solution could be to change how ignore comments are structured? Instead of <!-- TOC ignore:true -->
consider <!-- TOC-ignore -->
so that the extension can differentiate these comments.
If I have a setup like this:
When I trigger the command to
Insert/Update
, the unique settings are lost.That is:
is changed to:
Removing the TOC ignore line
<!-- TOC ignore:true -->
prevents this from happening.However, in my specific setup I would like to prevent the
## Table of Contents
section from being added while retaining the unique settings on the TOC.This can be addressed by adding the unique settings to a VSCode workspace preferences file, but this is not ideal. Other markdown files in the workspace might need different unique settings.
I have confirmed the
prettier-ignore
lines are not causing the issue, only the<!-- TOC ignore:true -->
line. Theprettier-ignore
is needed to prevent my code formatter from adding a blank line between the<!-- TOC ignore:true -->
and the heading I want to ignore (## Table of Contents
).VSCode:
markdown-toc
OS: