jackdewinter / pymarkdown

MIT License
75 stars 17 forks source link

Rule Md027 fires incorrectly on md031_final_bad_fenced_block_in_block_quote_in_list_in_block_quote_with_previous_block_with_thematics #1209

Closed jackdewinter closed 1 month ago

jackdewinter commented 1 month ago

Prerequisites

Bug Report

Please replace any of [these areas] in the paragraphs below with the requested information.

Bug Type

Description

Newly added test case md031_final_bad_fenced_block_in_block_quote_in_list_in_block_quote_with_previous_block_with_thematics fires incorrectly. When examining the firing of the rule, it looks like a calculation is off and > >{space} is compared to > > and is found to be different.

Specifics

What operating system and version are you running into this behavior on?

Win11

What version are you seeing this behavior in? (Run pip list or pipenv run pip list and look for the entry beside pymarkdownlnt.)

latest, main

Are there any extra steps that need to be taken before executing the application?

No

What is the command line you invoke to get this behavior?

md031_final_bad_fenced_block_in_block_quote_in_list_in_block_quote_with_previous_block_with_thematics

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.

No

What Markdown document causes this behavior to manifest? Attach that file to this issue.

> + > -----
>   > > block 1
>   > > block 2
>   > -----
>   >
>   > ```block
>   > A code block
>   > ```
>   >
>   > -----
> + another list

Actual Behavior

The two blanks lines around the code block are flagged as not being as expected.

Expected Behavior

Visually, those lines do not have any extra whitespace, and should not trigger this rule.