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

[FIX] tests: don't confuse separators for heading delimiters #12111

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

AntoineVDV
Copy link
Collaborator

No description provided.

@robodoo
Copy link
Collaborator

robodoo commented Feb 19, 2025

Pull request status dashboard

@C3POdoo C3POdoo requested a review from a team February 19, 2025 12:37
@@ -74,7 +74,8 @@ def check_min_one_main_heading(file, lines, options=None):
def check_heading_delimiters_length(file, lines, options=None):
""" Check that heading delimiters have the same length as their heading. """
for lno, line in enumerate(lines):
if HEADING_DELIMITER_RE.search(line): # The line is a heading delimiter.
previous_line = lno > 1 and lines[lno - 1]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
previous_line = lno > 1 and lines[lno - 1]
previous_line = lno >= 1 and lines[lno - 1]

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

Successfully merging this pull request may close these issues.

2 participants