Tags: headings
Aliases: no-code-headings
Fixable via script: Mostly fixable (see below for clash details)
This rule is triggered when a heading contains inline code. For example:
## Using `console.log()` for DebuggingTo fix this issue, remove the inline code from the heading and rephrase it to convey the same meaning without using code:
## Using console.log for DebuggingThis rule's fixer currently may not work correctly if there are spaces within inline code blocks. For example, the following scenario would have the default rule MD038 - no spaces in code run its fixer first.
<!-- Input -->
### A `space `inside a heading
<!-- Output -->
### A `space`inside a headingNotice how the space has been removed from inside the inline code block, but the code block has not been removed. Running the fix command will remove the inline code, but the space would then be missing between the words "space" and "inside".
Headings should be concise and descriptive, providing a clear overview of the section's content. Including inline code in headings can make them less readable and may not effectively convey the purpose of the section to users.