Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Return empty dict in FilenameRegexMetadata._extract_metadata_from_text
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 14, 2018
1 parent b9aa3fb commit 258132d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nikola/metadata_extractors.py
Expand Up @@ -239,6 +239,11 @@ class FilenameRegexMetadata(MetadataExtractor):
priority = MetaPriority.fallback
conditions = [(MetaCondition.config_bool, 'FILE_METADATA_REGEXP')]

def _extract_metadata_from_text(self, source_text: str) -> dict:
"""Extract metadata from text."""
# This extractor does not use the source text, and as such, this method returns an empty dict.
return {}

def extract_filename(self, filename: str, lang: str) -> dict:
"""Try to read the metadata from the filename based on the given re.
Expand Down

0 comments on commit 258132d

Please sign in to comment.