Skip to content
Permalink
Browse files
don't assume
  • Loading branch information
ralsina committed May 30, 2017
1 parent 5dc6956 commit cb5fe795d78c4c5d481e3b91c48b57ad305ee5ff
Showing with 2 additions and 2 deletions.
  1. +2 −2 nikola/plugins/compile/rest/__init__.py
@@ -62,7 +62,7 @@ class CompileRest(PageCompiler):

def read_metadata(self, post, file_metadata_regexp=None, unslugify_titles=False, lang=None):
"""Read the metadata from a post, and return a metadata dict."""
if not self.site.config['USE_REST_DOCINFO_METADATA']:
if not self.site.config.get('USE_REST_DOCINFO_METADATA'):
return {}
if lang is None:
lang = LocaleBorg().current_lang
@@ -118,7 +118,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la

from nikola import shortcodes as sc
new_data, shortcodes = sc.extract_shortcodes(data)
if self.site.config['USE_REST_DOCINFO_METADATA']:
if self.site.config.get('USE_REST_DOCINFO_METADATA'):
self.site.rst_transforms.append(RemoveDocinfo)
output, error_level, deps = rst2html(
new_data, settings_overrides=settings_overrides, logger=self.logger, source_path=source_path, l_add_ln=add_ln, transforms=self.site.rst_transforms,

0 comments on commit cb5fe79

Please sign in to comment.