Skip to content

Commit 8ce307e

Browse files
authored
Merge pull request #46 from Code4GovTech/fix/markdown2
markdown issue fixed - change library for markdown handling.
2 parents 69534e1 + 36adc24 commit 8ce307e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ python-dotenv==1.0.1
44
supabase==2.4.5
55
gunicorn==22.0.0
66
flasgger==0.9.7.1
7-
markdown2==2.4.13
7+
markdown==3.4.1
88
requests==2.32.2
99
flask-cors==4.0.1

v2_app.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import traceback,re
22
from flask import Blueprint, jsonify, request
33
import markdown2
4+
import markdown
45
from utils import require_secret_key
56
from db import SupabaseInterface
67
from utils import determine_week
@@ -51,7 +52,7 @@ def get_issues_by_owner_id_v2(owner, issue):
5152
if val['body_text']:
5253
if ("Weekly Goals" in val['body_text'] and not w_goal_url):
5354
w_goal_url = val['body_text']
54-
plain_text_body = markdown2.markdown(val['body_text'])
55+
plain_text_body = markdown.markdown(val['body_text'])
5556
tasks = re.findall(r'\[(x| )\]', plain_text_body)
5657
total_tasks = len(tasks)
5758
completed_tasks = tasks.count('x')

0 commit comments

Comments
 (0)