forked from github/pelican
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):
|
||||
"""Parse content and metadata of markdown files"""
|
||||
text = open(filename)
|
||||
md = Markdown(extensions=set(self.extensions + ['meta']))
|
||||
content = md.convert(text)
|
||||
with open(filename) as text:
|
||||
md = Markdown(extensions=set(self.extensions + ['meta']))
|
||||
content = md.convert(text)
|
||||
|
||||
metadata = {}
|
||||
for name, value in md.Meta.items():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue