Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong no-multiple-space-atx warning if atx heading is followed by a badly shaped <pre>-block #977

Closed
arwedus opened this issue Feb 1, 2024 · 2 comments

Comments

@arwedus
Copy link

arwedus commented Feb 1, 2024

Overview

This is an example for using <pre> tag instead of markdown code blocks notation.
No idea why someone would do it but it leads to an error in pymarkdown parsing.
It's a rare case and I think that the fact that we stumble upon such edge cases is a good sign showing the overall quality of pymarkdown, so thanks for that 👍🏼 .

Setup

Installed python packages:

application_properties==0.8.2
pymarkdownlnt==0.9.16
pyyaml==5.4.1.post0  # constraint

Command line:

pymarkdown -c pymarkdown.json scan readme.md

The file that causes the error:

readme.md

The error message is:

readme.md:29:1: MD019: Multiple spaces are present after hash character on Atx Heading. (no-multiple-space-atx)

Config

{
    "mode" : {
        "strict_config" : true
    },
    "extensions" : {
        "front-matter" : {
            "enabled" : true
        }
    },
    "plugins" : {
        "md002": {
            "enabled" : false
        },
        "md003": {
            "enabled" : true,
            "style" : "consistent",
            "allow-setext-update" : true
        },
        "md004": {
            "enabled" : false,
            "style": "sublist"
        },
        "md006": {
            "enabled" : true
        },
        "md007": {
            "enabled" : false
        },
        "md012": {
            "maximum": 2
        },
        "md013": {
            "enabled" : true,
            "line_length": 1000,
            "heading_line_length": 120,
            "code_block_line_length": 160
        },
        "md022" : {
            "lines_above": 1,
            "lines_below": 1
        },
        "md024" : {
            "enabled" : false
        },
        "md030": {
            "enabled" : false
        },
        "md033": {
            "enabled" : false
        },
        "md034": {
            "enabled" : false
        },
        "md036": {
            "enabled" : false
        },
        "md037": {
            "enabled" : false
        },
        "md040": {
            "enabled" : false
        },
        "md041": {
            "enabled" : false
        },
        "md045": {
            "enabled" : false
        },
        "code-block-style" : {
            "enabled" : false
        },
        "no-alt-text" : {
            "enabled" : false
        }
    }
}

steps to reproduce

python -m virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
pymarkdown -c pymarkdown.json scan readme.md
@jackdewinter
Copy link
Owner

will be in the next release.

@jackdewinter
Copy link
Owner

closed after no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants