diff options
Diffstat (limited to 'nikola/plugins/compile/pandoc.py')
| -rw-r--r-- | nikola/plugins/compile/pandoc.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nikola/plugins/compile/pandoc.py b/nikola/plugins/compile/pandoc.py index 3a2911f..57c7d71 100644 --- a/nikola/plugins/compile/pandoc.py +++ b/nikola/plugins/compile/pandoc.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 @@ -37,6 +37,11 @@ import subprocess from nikola.plugin_categories import PageCompiler from nikola.utils import req_missing, makedirs +try: + from collections import OrderedDict +except ImportError: + OrderedDict = None # NOQA + class CompilePandoc(PageCompiler): """Compile markups into HTML using pandoc.""" @@ -52,7 +57,10 @@ class CompilePandoc(PageCompiler): req_missing(['pandoc'], 'build this site (compile with pandoc)', python=False) 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)) |
