[GH-ISSUE #1608] Proposal: disallow formatting in headings #2564

Open
opened 2026-03-07 20:08:55 +03:00 by kerem · 2 comments
Owner

Originally created by @berot3 on GitHub (May 19, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1608

I sometimes copy paste text from somewhere and it does this formatting in the title, like bold or italic:

## **this is a heading**

Im not sure, but at least for me this is not wanted. to clean this up it would be helpful if markdownlint could point this occurrences out.

this is probably similar to #1308

Thanks!

Originally created by @berot3 on GitHub (May 19, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1608 <!-- Thank you for taking the time to report an issue! When deciding where to open an issue, please note there are multiple projects under the markdownlint umbrella: - https://github.com/DavidAnson/markdownlint : This is the core JavaScript/Node.js library and is used by other tools. Most issues with implementation and rule behavior belong here. - https://github.com/igorshubovych/markdownlint-cli : This is the original CLI for markdownlint. Issues specific to CLI belong here. - https://github.com/DavidAnson/markdownlint-cli2 : This is a newer CLI for markdownlint and is used by other tools. Issues specific to CLI2 belong here. - https://github.com/DavidAnson/vscode-markdownlint : This is the Visual Studio Code extension for markdownlint. Issues specific to VS Code belong here. - https://github.com/DavidAnson/markdownlint-cli2-action : This is a GitHub Action for markdownlint. Issues specific to the Action belong here. - https://github.com/markdownlint/markdownlint : This is the original markdownlint implementation for Ruby. All Ruby-related issues belong here. Before creating an issue, it's a good practice to search existing issues for something similar. If your issue has already been reported, please update the existing one with any new information. It's also good to review the documentation for any relevant details. When describing an issue, the following information is helpful: - What did you do? - What did you expect to happen? - What actually happened? - What messages or errors were there? - How can the issue be reproduced? - What version were you using? - What operating system were you using? The simplest demonstration of a problem is the most helpful. Small examples can be pasted into the issue description. (Be sure to paste as code so GitHub doesn't render the example in Markdown.) For larger examples, linking to a repository or file is more appropriate. Before proposing a new rule, please review the existing suggestions: https://github.com/DavidAnson/markdownlint/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+rule%22 Thank you! --> I sometimes copy paste text from somewhere and it does this formatting in the title, like bold or italic: `## **this is a heading**` Im not sure, but at least for me this is not wanted. to clean this up it would be helpful if markdownlint could point this occurrences out. this is probably similar to #1308 Thanks!
Author
Owner

@Malix-Labs commented on GitHub (Jul 14, 2025):

this is probably similar to #1308

It is adjacent but different

<!-- gh-comment-id:3070314345 --> @Malix-Labs commented on GitHub (Jul 14, 2025): > this is probably similar to #1308 It is adjacent but different
Author
Owner

@Malix-Labs commented on GitHub (Jul 14, 2025):

Partial formatting might be desired,
For example:

### Heading with an **important** word in it 

Total formatting might be more clearly an anti-pattern:

### **heading with everything formatted as bold** 
<!-- gh-comment-id:3070317106 --> @Malix-Labs commented on GitHub (Jul 14, 2025): Partial formatting might be desired, For example: ```md ### Heading with an **important** word in it ``` Total formatting might be more clearly an anti-pattern: ```md ### **heading with everything formatted as bold** ```
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#2564
No description provided.