Skip to content

MAINT Fix check for mismatched "ignore" blocks#1193

Merged
larsoner merged 1 commit intosphinx-gallery:masterfrom
speth:fix-ignore-block-check
Sep 11, 2023
Merged

MAINT Fix check for mismatched "ignore" blocks#1193
larsoner merged 1 commit intosphinx-gallery:masterfrom
speth:fix-ignore-block-check

Conversation

@speth
Copy link
Copy Markdown
Contributor

@speth speth commented Sep 9, 2023

The checks for mismatched "ignore" blocks were not detecting either "start" or "end" flags, and just comparing 0 == 0. This PR:

  • fixes these regex evaluations
  • corrects the name of "start" flag in the remove_ignore_blocks docstring
  • updates the test to simulate more realistic use case with a multi-line code block

Correct name of "start" flag in docstring

Update test to simulate more realistic use case
@larsoner larsoner added the bug label Sep 11, 2023
Copy link
Copy Markdown
Contributor

@larsoner larsoner left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @speth !

@larsoner larsoner merged commit 0c138ec into sphinx-gallery:master Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants