Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
flake8
  • Loading branch information
ralsina committed Jun 2, 2015
1 parent 4047f32 commit 1d4ebbb
Show file tree
Hide file tree
Showing 2 changed files with 303 additions and 271 deletions.
6 changes: 2 additions & 4 deletions v7/markmin/markmin/__init__.py
Expand Up @@ -29,10 +29,9 @@
import codecs
import os
import re
import subprocess

from nikola.plugin_categories import PageCompiler
from nikola.utils import makedirs, req_missing, write_metadata
from nikola.utils import makedirs, write_metadata
from . import markmin2html as m2h

try:
Expand All @@ -49,14 +48,13 @@ class CompileMarkmin(PageCompiler):

def compile_html(self, source, dest, is_two_file=True):
makedirs(os.path.dirname(dest))
binary = self.site.config.get('ASCIIDOC_BINARY', 'markmin')
with codecs.open(source, "rb+", "utf8") as in_f:
with codecs.open(dest, "wb+", "utf8") as out_f:
data = in_f.read()
if not is_two_file:
spl = re.split('(\n\n|\r\n\r\n)', data, maxsplit=1)
data = spl[-1]
body=m2h.markmin2html(data, pretty_print=True)
body = m2h.markmin2html(data, pretty_print=True)
out_f.write(body)

def create_post(self, path, **kw):
Expand Down

0 comments on commit 1d4ebbb

Please sign in to comment.