mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
fix failing test with new open context manager
This commit is contained in:
parent
caa4442abb
commit
56800a1d43
1 changed files with 3 additions and 3 deletions
|
|
@ -119,9 +119,9 @@ class MarkdownReader(Reader):
|
||||||
|
|
||||||
def read(self, filename):
|
def read(self, filename):
|
||||||
"""Parse content and metadata of markdown files"""
|
"""Parse content and metadata of markdown files"""
|
||||||
text = open(filename)
|
with open(filename) as text:
|
||||||
md = Markdown(extensions=set(self.extensions + ['meta']))
|
md = Markdown(extensions=set(self.extensions + ['meta']))
|
||||||
content = md.convert(text)
|
content = md.convert(text)
|
||||||
|
|
||||||
metadata = {}
|
metadata = {}
|
||||||
for name, value in md.Meta.items():
|
for name, value in md.Meta.items():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue