[GH-ISSUE #148] md040 should not require a language #1977

Closed
opened 2026-03-07 20:03:19 +03:00 by kerem · 1 comment
Owner

Originally created by @marcelomgarcia on GitHub (Oct 10, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/148

This is more a suggestion.

I use Markdown to write text related with system administration, and I use the fencing of text as the HTML "pre", so I don't need a language after the backticks . If I use "bash", the text block is treated as a shell script, and the prompt "#" becomes a commented line.

Searching about this issue, it seems that the language is not a requirement, only a convenience for having syntax highlighting. I disabled the rule "md040" on my settings, but I wonder if it really make sense.

Regads

Originally created by @marcelomgarcia on GitHub (Oct 10, 2018). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/148 This is more a suggestion. I use Markdown to write text related with system administration, and I use the fencing of text as the HTML "pre", so I don't need a language after the backticks . If I use "bash", the text block is treated as a shell script, and the prompt "#" becomes a commented line. Searching about this issue, it seems that the language is [not a requirement](https://help.github.com/articles/creating-and-highlighting-code-blocks/), only a convenience for having syntax highlighting. I disabled the rule "md040" on my settings, but I wonder if it really make sense. Regads
kerem 2026-03-07 20:03:19 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Oct 10, 2018):

Many of the linting rules are suggestions instead of requirements. Language detection is not always reliable, so some people want to be sure a language is specified. If that is not an issue for you, the rule can be disabled like you’ve done.

Sent with GitHawk

<!-- gh-comment-id:428628744 --> @DavidAnson commented on GitHub (Oct 10, 2018): Many of the linting rules are suggestions instead of requirements. Language detection is not always reliable, so some people want to be sure a language is specified. If that is not an issue for you, the rule can be disabled like you’ve done. <sub>Sent with <a href="http://githawk.com">GitHawk</a></sub>
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#1977
No description provided.