From 6276e3995bd2a55b5085be4d6de06de0e7131010 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 23 Aug 2023 19:02:27 +0200 Subject: [PATCH] appstore: switch to pycmarkgfm for markdown rendering --- store/app.py | 6 +++--- store/requirements.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/store/app.py b/store/app.py index 15c55249..2cb0a11e 100644 --- a/store/app.py +++ b/store/app.py @@ -1,4 +1,4 @@ -import markdown +import pycmarkgfm import time import re import toml @@ -137,7 +137,7 @@ def app_info(app_id): description_path = None if description_path: with open(description_path) as f: - infos["full_description_html"] = markdown.markdown(f.read()) + infos["full_description_html"] = pycmarkgfm.gfm_to_html(f.read()) else: infos["full_description_html"] = infos['manifest']['description'][locale] @@ -149,7 +149,7 @@ def app_info(app_id): pre_install_path = None if pre_install_path: with open(pre_install_path) as f: - infos["pre_install_html"] = markdown.markdown(f.read()) + infos["pre_install_html"] = pycmarkgfm.gfm_to_html(f.read()) infos["screenshot"] = None diff --git a/store/requirements.txt b/store/requirements.txt index fd2316cd..a982909d 100644 --- a/store/requirements.txt +++ b/store/requirements.txt @@ -2,5 +2,5 @@ Flask==2.3.2 python-slugify PyGithub toml -markdown +pycmarkgfm gunicorn