Skip to content
Permalink
Browse files
fix a strange bug
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Feb 13, 2015
1 parent 8061820 commit f1925b483cc160083dfba57382e3cca76ea7294c
Showing 1 changed file with 5 additions and 1 deletion.
@@ -41,7 +41,7 @@
has_docutils = False

from nikola.plugin_categories import PageCompiler
from nikola.utils import get_logger, makedirs, req_missing, write_metadata
from nikola.utils import unicode_str, get_logger, makedirs, req_missing, write_metadata


class CompileRest(PageCompiler):
@@ -97,6 +97,10 @@ def compile_html(self, source, dest, is_two_file=True):
'math_output': 'mathjax',
'template': default_template_path,
}, logger=self.logger, source_path=source, l_add_ln=add_ln)
if not isinstance(output, unicode_str):
# To prevent some weird bugs here or there.
# Original issue: empty files. `output` became a bytestring.
output = output.decode('utf-8')
out_file.write(output)
deps_path = dest + '.dep'
if deps.list:

0 comments on commit f1925b4

Please sign in to comment.