def render(file):
with file.open() as fp:<EOL><INDENT>encoding = detect_encoding(fp, default='<STR_LIT:utf-8>')<EOL>result = mistune.markdown(fp.read().decode(encoding))<EOL>return result<EOL><DEDENT>
Render HTML from Markdown file content.