Skip to content

Commit 06d35a6

Browse files
committed
This is the last ammend to the regex 100% real don't doubt it
1 parent 55ba375 commit 06d35a6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/sphinx/source/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,14 +384,15 @@ def setup(app):
384384
suppress_warnings = ['ref.footnote']
385385

386386
# settings for sphinx-gallery
387+
sep = os.path.sep
387388
sphinx_gallery_conf = {
388389
'examples_dirs': ['../../examples'], # location of gallery scripts
389390
'gallery_dirs': ['gallery'], # location of generated output
390391

391392
# do not execute gallery examples that begin with NX_
392393
# os.path.sep in negative lookahead ensures exclusive match of filename
393394
# https://sphinx-gallery.github.io/stable/configuration.html#parsing-and-executing-examples-via-matching-patterns # noqa: E501
394-
'filename_pattern': rf"^((?!{os.path.sep}NX_).)*$",
395+
'filename_pattern': rf"^(?!{sep}.*?{sep})((?!{sep}NX_).)*$",
395396

396397
# directory where function/class granular galleries are stored
397398
'backreferences_dir': 'reference/generated/gallery_backreferences',

0 commit comments

Comments
 (0)