summaryrefslogtreecommitdiffstats
path: root/nikola/plugins/compile/textile.py
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:38 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2014-02-28 08:49:38 -0300
commit2828399ba5cbb14502b023d4de1ba02f13dd5055 (patch)
tree38012b6bacaa508ca56fb6f4ba87b912bb54b8c9 /nikola/plugins/compile/textile.py
parentca94afc07df55cb7fc6fe3b4f3011877b7881195 (diff)
Imported Upstream version 6.3.0upstream/6.3.0
Diffstat (limited to 'nikola/plugins/compile/textile.py')
-rw-r--r--nikola/plugins/compile/textile.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/nikola/plugins/compile/textile.py b/nikola/plugins/compile/textile.py
index b402329..73f35c0 100644
--- a/nikola/plugins/compile/textile.py
+++ b/nikola/plugins/compile/textile.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright © 2012-2013 Roberto Alsina and others.
+# Copyright © 2012-2014 Roberto Alsina and others.
# Permission is hereby granted, free of charge, to any
# person obtaining a copy of this software and associated
@@ -38,11 +38,17 @@ except ImportError:
from nikola.plugin_categories import PageCompiler
from nikola.utils import makedirs, req_missing
+try:
+ from collections import OrderedDict
+except ImportError:
+ OrderedDict = None # NOQA
+
class CompileTextile(PageCompiler):
"""Compile textile into HTML."""
name = "textile"
+ demote_headers = True
def compile_html(self, source, dest, is_two_file=True):
if textile is None:
@@ -57,7 +63,10 @@ class CompileTextile(PageCompiler):
out_file.write(output)
def create_post(self, path, onefile=False, **kw):
- metadata = {}
+ if OrderedDict is not None:
+ metadata = OrderedDict()
+ else:
+ metadata = {}
metadata.update(self.default_metadata)
metadata.update(kw)
makedirs(os.path.dirname(path))