Repos / pytaku / 174370b195
commit 174370b1956f6df565023868e6941a8573a6ad57
Author: Bùi Thành Nhân <hi@imnhan.com>
Date: Wed Jan 27 21:30:59 2021 +0700
don't split mangadex descriptions by papragraphs
Because if a spoiler tag's content has multiple paragraphs, it would be
cut short.
diff --git a/pyproject.toml b/pyproject.toml
index 11eedc3..de0b1f2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytaku"
-version = "0.4.0"
+version = "0.4.1"
description = "Self-hostable web-based manga reader"
authors = ["Bùi Thành Nhân <hi@imnhan.com>"]
license = "AGPL-3.0-only"
diff --git a/src/mangoapi/mangadex.py b/src/mangoapi/mangadex.py
index 98d73ea..3d45d33 100644
--- a/src/mangoapi/mangadex.py
+++ b/src/mangoapi/mangadex.py
@@ -38,9 +38,7 @@ def get_title(self, title_id):
"cover_ext": cover_ext,
"alt_names": manga["altTitles"],
"descriptions": [
- _bbparser.format(paragraph)
- for paragraph in html.unescape(manga["description"]).split("\r\n")
- if paragraph.strip()
+ _bbparser.format(html.unescape(manga["description"]).strip())
],
"descriptions_format": "html",
"is_webtoon": LONG_STRIP_TAG_ID in manga["tags"],