Skip to content

Commit

Permalink
Merge pull request #91 from Nadro-J/main
Browse files Browse the repository at this point in the history
Error processing referendum 1384
  • Loading branch information
Nadro-J authored Jan 15, 2025
2 parents 8d510f8 + 98a1d16 commit 07fd352
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bot/utils/data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def replacer_image(match):
markdown_text = re.sub(r'(?:\s*\n){3,}', '\n\n', markdown_text) # Replace three or more newlines with optional spaces with just one newline
markdown_text = markdown_text.rstrip('\n') # Remove trailing line breaks

if len(markdown_text) == 0:
return "Unable to retrieve content"

return markdown_text

@staticmethod
Expand Down

0 comments on commit 07fd352

Please sign in to comment.