From 19dc8e3c012638ca15e5f48fcbbd7db194c7d769 Mon Sep 17 00:00:00 2001 From: Maxim Belkin Date: Fri, 9 Jul 2021 21:56:28 -0500 Subject: [PATCH] lesson_check.py: use proper regex for matching episode files --- bin/lesson_check.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/lesson_check.py b/bin/lesson_check.py index 196743e4..7f950a44 100644 --- a/bin/lesson_check.py +++ b/bin/lesson_check.py @@ -533,7 +533,7 @@ def check(self): """Run extra tests.""" super().check() - if not using_remote_theme(args.source_dir): + if not using_remote_theme(self.args.source_dir): self.check_reference_inclusion() def check_metadata(self): @@ -601,7 +601,8 @@ def __init__(self, args, filename, metadata, metadata_len, text, lines, doc): (re.compile(r'README\.md'), CheckNonJekyll), (re.compile(r'index\.md'), CheckIndex), (re.compile(r'reference\.md'), CheckReference), - (re.compile(os.path.join('_episodes', '*\.md')), CheckEpisode), + # '.' below is what's passed on the command line via '-s' flag + (re.compile(os.path.join('.','_episodes', '[^/]*\.md')), CheckEpisode), (re.compile(r'.*\.md'), CheckGeneric) ]