devicehub-django/environmental_impact/algorithms/docs_renderer.py

9 lines
203 B
Python
Raw Normal View History

2025-02-25 08:51:04 +00:00
import markdown
def render_docs(file_path):
with open(file_path, 'r') as file:
markdown_content = file.read()
html_content = markdown.markdown(markdown_content)
return html_content