[GH-ISSUE #309] [MD036] exclude **Table of Contents** by default or make it configurable #2115

Closed
opened 2026-03-07 20:04:43 +03:00 by kerem · 3 comments
Owner

Originally created by @sfuerte on GitHub (Jul 30, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/309

Any possibility of making the subject exclusion in MD036 by default or configurable?

The problem:
Using Bitbucket, it allows [TOC] macro for table of contents generation (https://support.atlassian.com/bitbucket-cloud/docs/add-a-table-of-contents-to-a-wiki). I don't want to have the ToC line in list itself, hence simply making it bold. But then there is a warning from markdownlint. See below. A bit of catch 22.

On the another hand, if https://github.com/DavidAnson/markdownlint/issues/295 is implemented, then it'll solve this one also.

Thanks in advance!

image

Originally created by @sfuerte on GitHub (Jul 30, 2020). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/309 Any possibility of making the subject exclusion in MD036 by default or configurable? The problem: Using Bitbucket, it allows `[TOC]` macro for table of contents generation (https://support.atlassian.com/bitbucket-cloud/docs/add-a-table-of-contents-to-a-wiki). I don't want to have the ToC line in list itself, hence simply making it bold. But then there is a warning from `markdownlint`. See below. A bit of catch 22. On the another hand, if https://github.com/DavidAnson/markdownlint/issues/295 is implemented, then it'll solve this one also. Thanks in advance! ![image](https://user-images.githubusercontent.com/16941995/88956918-5483c480-d25b-11ea-8a15-81ebe2c827bf.png)
kerem 2026-03-07 20:04:43 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Jul 30, 2020):

You can do this today like so: https://dlaa.me/markdownlint/#%25m%23%20Issue%20309%0A%0A%3C!--%20markdownlint-disable%20no-emphasis-as-heading%20--%3E%0ATable%20of%20Contents%0A%3C!--%20markdownlint-restore--%3E%0A

<!-- gh-comment-id:666569584 --> @DavidAnson commented on GitHub (Jul 30, 2020): You can do this today like so: https://dlaa.me/markdownlint/#%25m%23%20Issue%20309%0A%0A%3C!--%20markdownlint-disable%20no-emphasis-as-heading%20--%3E%0A**Table%20of%20Contents**%0A%3C!--%20markdownlint-restore--%3E%0A
Author
Owner

@sfuerte commented on GitHub (Jul 30, 2020):

Perfect. Thanks for the info!

<!-- gh-comment-id:666593969 --> @sfuerte commented on GitHub (Jul 30, 2020): Perfect. Thanks for the info!
Author
Owner

@dwettstein commented on GitHub (Dec 13, 2021):

Just for documentation within this issue, this is also possible now:

<!-- markdownlint-disable-next-line MD036 -->
**Table of Contents**
<!-- gh-comment-id:992293719 --> @dwettstein commented on GitHub (Dec 13, 2021): Just for documentation within this issue, this is also possible now: ``` <!-- markdownlint-disable-next-line MD036 --> **Table of Contents** ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#2115
No description provided.