Skip to content

Commit

Permalink
Merge pull request #615
Browse files Browse the repository at this point in the history
lesson_check.py: use proper regex for matching episode files
  • Loading branch information
maxim-belkin authored Jul 12, 2021
2 parents d0aceb3 + 19dc8e3 commit 14d7356
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/lesson_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,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):
Expand Down Expand Up @@ -616,7 +616,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)
]

Expand Down

0 comments on commit 14d7356

Please sign in to comment.