You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. The prettier-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).
I noticed there is a similar comment here: #40 (comment)
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:
<!-- TOC depthFrom:2 depthTo:3 updateOnSave:false -->
is changed to:
<!-- TOC -->
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:
The text was updated successfully, but these errors were encountered: