diff --git a/changelog.d/20250416_192443_mlabeeb03_fix_description_images.md b/changelog.d/20250416_192443_mlabeeb03_fix_description_images.md new file mode 100644 index 0000000..22247b3 --- /dev/null +++ b/changelog.d/20250416_192443_mlabeeb03_fix_description_images.md @@ -0,0 +1 @@ +- [Bugfix] Prevent images in plugin description from overflowing. (by @mlabeeb03) diff --git a/tutordeck/server/app.py b/tutordeck/server/app.py index d5151ba..85c08cf 100644 --- a/tutordeck/server/app.py +++ b/tutordeck/server/app.py @@ -1,6 +1,7 @@ import asyncio import json import logging +import re import sys import typing as t @@ -81,7 +82,7 @@ async def plugin_store_list() -> str: "url": p.url, "index": p.index, "author": p.author.split("<")[0].strip(), - "description": markdown(p.description.replace("\n", " ")), + "description": p.short_description, "is_installed": p.name in g.installed_plugins, "is_enabled": p.name in g.enabled_plugins, } @@ -109,7 +110,7 @@ async def plugin_installed_list() -> str: "url": p.url, "index": p.index, "author": p.author.split("<")[0].strip(), - "description": markdown(p.description.replace("\n", " ")), + "description": p.short_description, "is_enabled": p.name in g.enabled_plugins, } for p in tutorclient.Client.plugins_in_store() diff --git a/tutordeck/server/static/scss/deck.scss b/tutordeck/server/static/scss/deck.scss index 954677c..8f3dafa 100644 --- a/tutordeck/server/static/scss/deck.scss +++ b/tutordeck/server/static/scss/deck.scss @@ -290,6 +290,12 @@ main { #plugin-full-description { border-top: 1px solid $gray-1; padding: 1em 0em; + + p { + img { + width: 100%; + } + } } .search-and-button { display: flex;