You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please replace any of [these areas] in the paragraphs below with the requested information.
Bug Type
Assertion Failure
Documentation
Scan/Rule not working as expected
Fix/Rule not working as expected
Other
[Other reason]
Description
A heading such as ## Intro to C\# violates Rule MD020.
The correct scenarios for MD020 currently don't provide an example of this particular case. However, escaped hashes are not markup tokens and probably should not be interpreted as Atx-style heading delimiters.
What version are you seeing this behavior in? (Run pip list or pipenv run pip list and look for the entry beside pymarkdownlnt.)
0.9.26
Are there any extra steps that need to be taken before executing the application?
N/A
What is the command line you invoke to get this behavior?
pymarkdownlnt scan MD020.md
Are you using a configuration file? Either on the command line or one of the implicit configuration files? If so, attach that file to this issue.
N/A
What Markdown document causes this behavior to manifest? Attach that file to this issue.
# MD020<!-- Escaped hash at end of line -->## Intro to C\#
Emits MD020 warning.
<!-- Escaped hash followed by punctuation -->### Intro to C\#, continued
Emits nothing.
<!-- Escaped hash followed by a space -->## Intro to C\# programming
Emits nothing.
Actual Behavior
The escaped hash at the end of line 5 is interpreted as the closure of an Atx-style heading:
MD020.md:5:16: MD020: No space present inside of the hashes on a possible Atx Closed Heading. (no-missing-space-closed-atx)
Expected Behavior
No warnings.
The text was updated successfully, but these errors were encountered:
Prerequisites
Are you running the latest version of this application?
Have you checked the Frequently Asked Questions document?
Have you simplified the bug report to the essential details?
Did you perform a cursory search of other issues to look for related issues?
Found these (tangentially) related issues:
Bug Report
Please replace any of
[these areas]
in the paragraphs below with the requested information.Bug Type
[Other reason]
Description
A heading such as
## Intro to C\#
violates Rule MD020.The correct scenarios for MD020 currently don't provide an example of this particular case. However, escaped hashes are not markup tokens and probably should not be interpreted as Atx-style heading delimiters.
For comparison, markdownlint implements a more relax version of MD020 that anticipates escaped hashes in line-end position: markdownlint/markdownlint@b2529c6
Specifics
What operating system and version are you running into this behavior on?
Linux debian 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
What version are you seeing this behavior in? (Run
pip list
orpipenv run pip list
and look for the entry besidepymarkdownlnt
.)0.9.26
Are there any extra steps that need to be taken before executing the application?
N/A
What is the command line you invoke to get this behavior?
Are you using a configuration file? Either on the command line or one of the implicit configuration files? If so, attach that file to this issue.
N/A
What Markdown document causes this behavior to manifest? Attach that file to this issue.
Actual Behavior
The escaped hash at the end of line 5 is interpreted as the closure of an Atx-style heading:
Expected Behavior
No warnings.
The text was updated successfully, but these errors were encountered: