Skip to content

Commit

Permalink
Merge pull request #46 from Code4GovTech/fix/markdown2
Browse files Browse the repository at this point in the history
markdown issue fixed - change library for markdown handling.
  • Loading branch information
karntrehan authored Aug 6, 2024
2 parents 69534e1 + 36adc24 commit 8ce307e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ python-dotenv==1.0.1
supabase==2.4.5
gunicorn==22.0.0
flasgger==0.9.7.1
markdown2==2.4.13
markdown==3.4.1
requests==2.32.2
flask-cors==4.0.1
3 changes: 2 additions & 1 deletion v2_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import traceback,re
from flask import Blueprint, jsonify, request
import markdown2
import markdown
from utils import require_secret_key
from db import SupabaseInterface
from utils import determine_week
Expand Down Expand Up @@ -51,7 +52,7 @@ def get_issues_by_owner_id_v2(owner, issue):
if val['body_text']:
if ("Weekly Goals" in val['body_text'] and not w_goal_url):
w_goal_url = val['body_text']
plain_text_body = markdown2.markdown(val['body_text'])
plain_text_body = markdown.markdown(val['body_text'])
tasks = re.findall(r'\[(x| )\]', plain_text_body)
total_tasks = len(tasks)
completed_tasks = tasks.count('x')
Expand Down

0 comments on commit 8ce307e

Please sign in to comment.