Skip to content

Commit

Permalink
Merge pull request #40 from Code4GovTech/api_markdown_fix
Browse files Browse the repository at this point in the history
added ul tags for corretly render in FE
  • Loading branch information
sasi2312 authored Jul 24, 2024
2 parents c385f15 + 56c26e7 commit 9e63e33
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions v2_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ def remove_unmatched_tags(text):
# Remove extra unmatched angle brackets
cleaned_text = re.sub(r'>+', '>', cleaned_text)
cleaned_text = re.sub(r'<+', '<', cleaned_text)

#For front end renders add ul tags
if not cleaned_text.strip().startswith("<ul>"):
return f"<ul>{text}</ul>"

return cleaned_text

Expand Down

0 comments on commit 9e63e33

Please sign in to comment.