Skip to content

Commit 091d31a

Browse files
authored
Merge pull request #558 from zkamvar/znk-fix-550
Add catch for None type code block in lesson_check
2 parents a283c4b + cce6a66 commit 091d31a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/lesson_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ def check_codeblock_classes(self):
392392

393393
for node in self.find_all(self.doc, {'type': 'codeblock'}):
394394
cls = self.get_val(node, 'attr', 'class')
395-
self.reporter.check(cls in KNOWN_CODEBLOCKS or cls.startswith('language-'),
395+
self.reporter.check(cls is not None and (cls in KNOWN_CODEBLOCKS or
396+
cls.startswith('language-')),
396397
(self.filename, self.get_loc(node)),
397398
'Unknown or missing code block type {0}',
398399
cls)

0 commit comments

Comments
 (0)