Skip to content

Commit

Permalink
added ul tags for corretly render in FE
Browse files Browse the repository at this point in the history
  • Loading branch information
sasi2312 committed Jul 24, 2024
1 parent ca8b54a commit 56c26e7
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 56c26e7

Please sign in to comment.