Navigation Menu

Skip to content

Commit

Permalink
Implement MARKDOWN_EXTENSION_CONFIGS properly (#2970)
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 13, 2018
1 parent 21f8c31 commit ad886d6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
14 changes: 13 additions & 1 deletion CHANGES.txt
@@ -1,7 +1,19 @@
Changes since Beta 2
====================

.. to be merged into one "new in v8.0.0" entry later
Features
--------

Bugfixes
--------

* Implement ``MARKDOWN_EXTENSION_CONFIGS`` properly (Issue #2970)

New in v8.0.0b2 (changes since Beta 1)
======================================

.. to be merged into one "new in v8.0.0" entry later

Important compatibility changes not mentioned previously
--------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/markdown/__init__.py
Expand Up @@ -98,7 +98,7 @@ def set_site(self, site):
if Markdown is not None:
self.converters = {}
for lang in self.site.config['TRANSLATIONS']:
self.converters[lang] = ThreadLocalMarkdown(extensions, site_extension_configs.get(lang, {}))
self.converters[lang] = ThreadLocalMarkdown(extensions, site_extension_configs(lang))
self.supports_metadata = 'markdown.extensions.meta' in extensions

def compile_string(self, data, source_path=None, is_two_file=True, post=None, lang=None):
Expand Down
6 changes: 1 addition & 5 deletions nikola/utils.py
Expand Up @@ -353,11 +353,7 @@ def __call__(self, lang=None):

def __str__(self):
"""Return the value in the currently set language (deprecated)."""
return self.values[self.get_lang()]

def __unicode__(self):
"""Return the value in the currently set language (deprecated)."""
return self.values[self.get_lang()]
return str(self.values[self.get_lang()])

def __repr__(self):
"""Provide a representation for programmers."""
Expand Down

0 comments on commit ad886d6

Please sign in to comment.