Skip to content
Browse files
Using new feature from getnikola/nikola#2878.
  • Loading branch information
felixfontein committed Jul 24, 2017
1 parent a903c89 commit bb0bfe089f226b401b452e8197193361e471adc0
Showing 1 changed file with 4 additions and 10 deletions.
@@ -105,17 +105,11 @@ def _parse_comment(self, filename):
for priority in metadata_extractors.MetaPriority:
found_in_priority = False
for extractor in['priority'].get(priority, []):
# We need to do a first check ourselves since metadata_extractors.check_conditions
# expects a post object (to check the compiler, if MetaCondition.compiler is used).
skip_extractor = False
for ct, arg in extractor.conditions:
if ct == metadata_extractors.MetaCondition.compiler:
skip_extractor = True
if skip_extractor:
# Now call metadata_extractors.check_conditions to check whether the extractor
# Call metadata_extractors.check_conditions to check whether the extractor
# can be used, and if that succeeds, check whether all requirements for the
# extractor are there.
# extractor are there. We pass None as the post since we don't have a post.
# The (currently only) consequence is that compiler-specific plugins don't
# work: after all, the compiler is determined from the metadata to be extracted.
if not metadata_extractors.check_conditions(None, filename, extractor.conditions,, source_text):

0 comments on commit bb0bfe0

Please sign in to comment.