# What kinds of blockquotes are allowed?
KNOWN_BLOCKQUOTES = {
'callout',
+ 'caution',
'challenge',
'checklist',
'discussion',
}
# What kinds of code fragments are allowed?
+# Below we allow all 'language-*' code blocks
KNOWN_CODEBLOCKS = {
'error',
'output',
'source',
- 'language-bash',
- 'html',
- 'language-c',
- 'language-cmake',
- 'language-cpp',
- 'language-make',
- 'language-matlab',
- 'language-python',
- 'language-r',
- 'language-shell',
- 'language-sql',
'warning'
}
reporter.check_field(config_file, 'configuration',
config, 'kind', 'lesson')
reporter.check_field(config_file, 'configuration',
- config, 'carpentry', ('swc', 'dc', 'lc', 'cp'))
+ config, 'carpentry', ('swc', 'dc', 'lc', 'cp', 'incubator'))
reporter.check_field(config_file, 'configuration', config, 'title')
reporter.check_field(config_file, 'configuration', config, 'email')
for node in self.find_all(self.doc, {'type': 'codeblock'}):
cls = self.get_val(node, 'attr', 'class')
- self.reporter.check(cls in KNOWN_CODEBLOCKS,
+ self.reporter.check(cls in KNOWN_CODEBLOCKS or cls.startswith('language-'),
(self.filename, self.get_loc(node)),
'Unknown or missing code block type {0}',
cls)