diff options
Diffstat (limited to 'nikola/plugins/compile/html.py')
| -rw-r--r-- | nikola/plugins/compile/html.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nikola/plugins/compile/html.py b/nikola/plugins/compile/html.py index 24bf385..ab0c2f6 100644 --- a/nikola/plugins/compile/html.py +++ b/nikola/plugins/compile/html.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright © 2012-2014 Roberto Alsina and others. +# Copyright © 2012-2015 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated @@ -29,18 +29,16 @@ from __future__ import unicode_literals import os -import re import io from nikola.plugin_categories import PageCompiler from nikola.utils import makedirs, write_metadata -_META_SEPARATOR = '(' + os.linesep * 2 + '|' + ('\n' * 2) + '|' + ("\r\n" * 2) + ')' - class CompileHtml(PageCompiler): """Compile HTML into HTML.""" name = "html" + friendly_name = "HTML" def compile_html(self, source, dest, is_two_file=True): makedirs(os.path.dirname(dest)) @@ -48,7 +46,7 @@ class CompileHtml(PageCompiler): with io.open(source, "r", encoding="utf8") as in_file: data = in_file.read() if not is_two_file: - data = re.split(_META_SEPARATOR, data, maxsplit=1)[-1] + _, data = self.split_metadata(data) out_file.write(data) return True |
