mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Add MD_OUTPUT_FORMAT to readers.py
This commit is contained in:
parent
3b54f3e418
commit
82d1bcc678
1 changed files with 2 additions and 1 deletions
|
|
@ -199,6 +199,7 @@ class MarkdownReader(BaseReader):
|
|||
def __init__(self, *args, **kwargs):
|
||||
super(MarkdownReader, self).__init__(*args, **kwargs)
|
||||
self.extensions = list(self.settings['MD_EXTENSIONS'])
|
||||
self.output_format = self.settings['MD_OUTPUT_FORMAT']
|
||||
if 'meta' not in self.extensions:
|
||||
self.extensions.append('meta')
|
||||
|
||||
|
|
@ -226,7 +227,7 @@ class MarkdownReader(BaseReader):
|
|||
def read(self, source_path):
|
||||
"""Parse content and metadata of markdown files"""
|
||||
|
||||
self._md = Markdown(extensions=self.extensions)
|
||||
self._md = Markdown(extensions=self.extensions, output_format=self.output_format)
|
||||
with pelican_open(source_path) as text:
|
||||
content = self._md.convert(text)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue