From ee46becaf9e7c4c585d9f8b3fd5f112bf9ef11df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bunel?= Date: Wed, 3 Oct 2012 22:29:59 +0200 Subject: [PATCH] FIX: Standardizing "extentions" to "extensions" --- pelican/readers.py | 10 +++++----- pelican/settings.py | 2 +- tests/test_generators.py | 2 +- tests/test_readers.py | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pelican/readers.py b/pelican/readers.py index 1c2ac666..55d5ceaa 100644 --- a/pelican/readers.py +++ b/pelican/readers.py @@ -128,13 +128,13 @@ class MarkdownReader(Reader): def read(self, filename): """Parse content and metadata of markdown files""" - markdown_extentions = self.settings.get('MARKDOWN_EXTENTIONS', []) - if isinstance(markdown_extentions, (str, unicode)): - markdown_extentions = [m.strip() for m in - markdown_extentions.split(',')] + markdown_extensions = self.settings.get('MARKDOWN_EXTENsIONS', []) + if isinstance(markdown_extensions, (str, unicode)): + markdown_extensions = [m.strip() for m in + markdown_extensions.split(',')] text = pelican_open(filename) md = Markdown(extensions=set( - self.extensions + markdown_extentions + ['meta'])) + self.extensions + markdown_extensions + ['meta'])) content = md.convert(text) metadata = {} diff --git a/pelican/settings.py b/pelican/settings.py index ad0ff8fc..c454c27b 100644 --- a/pelican/settings.py +++ b/pelican/settings.py @@ -75,7 +75,7 @@ _DEFAULT_CONFIG = {'PATH': '.', 'SUMMARY_MAX_LENGTH': 50, 'WEBASSETS': False, 'PLUGINS': [], - 'MARKDOWN_EXTENTIONS': [ 'toc', ], + 'MARKDOWN_EXTENSIONS': ['toc', ], } diff --git a/tests/test_generators.py b/tests/test_generators.py index caad4725..374172d8 100644 --- a/tests/test_generators.py +++ b/tests/test_generators.py @@ -69,7 +69,7 @@ class TestArticlesGenerator(unittest.TestCase): [u'Article title', 'published', 'Default', 'article'], [u'Article with template', 'published', 'Default', 'custom'], [u'Test md File', 'published', 'test', 'article'], - [u'Test Markdown extentions', 'published', u'Default', 'article'], + [u'Test Markdown extensions', 'published', u'Default', 'article'], [u'This is a super article !', 'published', 'Yeah', 'article'], [u'This is an article with category !', 'published', 'yeah', 'article'], [u'This is an article without category !', 'published', 'Default', 'article'], diff --git a/tests/test_readers.py b/tests/test_readers.py index d831252d..1b3a879c 100644 --- a/tests/test_readers.py +++ b/tests/test_readers.py @@ -95,8 +95,8 @@ class MdReaderTest(unittest.TestCase): def test_article_with_markdown_markup_extension(self): # test to ensure the markdown markup extension is being processed as expected reader = readers.MarkdownReader({}) - reader.settings.update(dict(MARKDOWN_EXTENTIONS=['toc'])) - content, metadata = reader.read(_filename('article_with_markdown_markup_extentions.md')) + reader.settings.update(dict(MARKDOWN_EXTENSIONS=['toc'])) + content, metadata = reader.read(_filename('article_with_markdown_markup_extensions.md')) expected = '
\n'\ '