diff --git a/src/routes/read.py b/src/routes/read.py index d56eeb6..4d67c89 100644 --- a/src/routes/read.py +++ b/src/routes/read.py @@ -21,7 +21,7 @@ def read(file: int) -> str: read_page=True, page_name=name, name=f"{file}.txt", - file=post.content if post else None, + file=post.content.split("\n") if post else None, post_file_id=post_file_id, date=post.creation_date if post else None, ) diff --git a/src/templates/read.html b/src/templates/read.html index a20e696..0451a1d 100644 --- a/src/templates/read.html +++ b/src/templates/read.html @@ -10,8 +10,9 @@ {% if file %}

{{ name }}

-

{{ file }}

- {% else %} + {% for para in file %} +

{{para}}

+ {% endfor %} {% else %}

{{ name }} doesn't exists

{% endif %}