[GH-ISSUE #1191] MD033: Organizing information with collapsed sections #2483

Closed
opened 2026-03-07 20:08:11 +03:00 by kerem · 7 comments
Owner

Originally created by @Obegg on GitHub (Apr 28, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1191

According to github docs: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections

I use:

<details><summary>
Example (Click to expand):
</summary>

But I get error:

MD033/no-inline-html: Inline HTML [Element: details]

What should I do?

Originally created by @Obegg on GitHub (Apr 28, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1191 According to github docs: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections I use: ``` <details><summary> Example (Click to expand): </summary> ``` But I get error: ``` MD033/no-inline-html: Inline HTML [Element: details] ``` What should I do?
kerem 2026-03-07 20:08:11 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Apr 29, 2024):

If you want to include inline HTML in your Markdown, you should disable the no-inline-html rule. The README shows multiple ways to do so.

<!-- gh-comment-id:2081802913 --> @DavidAnson commented on GitHub (Apr 29, 2024): If you want to include inline HTML in your Markdown, you should disable the `no-inline-html` rule. The README shows multiple ways to do so.
Author
Owner

@Obegg commented on GitHub (Apr 29, 2024):

let's assume I don't want inline HTML - how do I get the same result (collapsed section)?

<!-- gh-comment-id:2082019233 --> @Obegg commented on GitHub (Apr 29, 2024): let's assume I don't want inline HTML - how do I get the same result (collapsed section)?
Author
Owner

@DavidAnson commented on GitHub (Apr 29, 2024):

I don't think the CommonMark specification (or GFM extensions) offers a way to do that.

<!-- gh-comment-id:2083117024 --> @DavidAnson commented on GitHub (Apr 29, 2024): I don't think the CommonMark specification (or GFM extensions) offers a way to do that.
Author
Owner

@Obegg commented on GitHub (Apr 29, 2024):

So if I understand correctly - this error can't be fixed since there's no way to create collapsed sections without using inline HTML,.
If so - then I guess this extension need to add an exception whenever it detects inline HTML for collapsed sections such as <details> and <summery>

<!-- gh-comment-id:2083268397 --> @Obegg commented on GitHub (Apr 29, 2024): So if I understand correctly - this error can't be fixed since there's no way to create collapsed sections without using inline HTML,. If so - then I guess this extension need to add an exception whenever it detects inline HTML for collapsed sections such as `<details>` and `<summery>`
Author
Owner

@DavidAnson commented on GitHub (Apr 29, 2024):

There are many things that can be done in HTML that cannot be done in Markdown. If you want to do many of them, you can disable this rule. If you want to do some of them, you can customize the rule to allow the relevant elements: https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md

<!-- gh-comment-id:2083810586 --> @DavidAnson commented on GitHub (Apr 29, 2024): There are many things that can be done in HTML that cannot be done in Markdown. If you want to do many of them, you can disable this rule. If you want to do some of them, you can customize the rule to allow the relevant elements: https://github.com/DavidAnson/markdownlint/blob/main/doc/md033.md
Author
Owner

@Obegg commented on GitHub (Apr 29, 2024):

But it should not be custom specifically for me, it should be added globally, I'm not the only one who uses this extension and has collapsed sections.

<!-- gh-comment-id:2083817580 --> @Obegg commented on GitHub (Apr 29, 2024): But it should not be custom specifically for me, it should be added globally, I'm not the only one who uses this extension and has collapsed sections.
Author
Owner

@DavidAnson commented on GitHub (Apr 30, 2024):

The rule exists to block HTML and keep Markdown content pure - for people who want that. The specific scenario raised above does not seem to be more special than any other. In fact, this issue may be the first time it has come up.

<!-- gh-comment-id:2084468829 --> @DavidAnson commented on GitHub (Apr 30, 2024): The rule exists to block HTML and keep Markdown content pure - for people who want that. The specific scenario raised above does not seem to be more special than any other. In fact, this issue may be the first time it has come up.
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#2483
No description provided.