Skip to content
Permalink
Browse files

flake8

  • Loading branch information
ralsina committed Jun 2, 2015
1 parent 4047f32 commit 1d4ebbb82e1af8570ffe4190e8f0b94d58fee445
Showing with 303 additions and 271 deletions.
  1. +2 −4 v7/markmin/markmin/__init__.py
  2. +301 −267 v7/markmin/markmin/markmin2html.py
@@ -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:
@@ -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):

0 comments on commit 1d4ebbb

Please sign in to comment.