cotcotquedec commited on
Commit
1441d80
·
1 Parent(s): cc5c78b

refactor(root): trim first 10 lines from README.md content in root endpoint

Browse files

The root endpoint now trims the first 10 lines from the README.md content before converting it to HTML. This change improves the presentation of the documentation by removing unnecessary introductory lines.

This refactoring ensures that the displayed content is more concise and directly relevant to the user's needs.

Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -130,6 +130,7 @@ async def read_root():
130
  return HTMLResponse(content="<h1>README.md non trouvé</h1>")
131
 
132
  md_text = readme_path.read_text(encoding='utf-8')
 
133
 
134
  # Conversion Markdown vers HTML
135
  html = markdown.markdown(
 
130
  return HTMLResponse(content="<h1>README.md non trouvé</h1>")
131
 
132
  md_text = readme_path.read_text(encoding='utf-8')
133
+ md_text = '\n'.join(md_text.split('\n')[10:])
134
 
135
  # Conversion Markdown vers HTML
136
  html = markdown.markdown(