prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Make newlines visible in the deleted messages front-end
  The deleted messages front-end currently doesn't display newlines if they're consecutive, i.e., if the lines are otherwise empty (`"\n\n\n\n\n\n\n\n\n"`). This makes it difficult to interpret what actually happened in chat. A good solution to this would be to make newlines character visible using the `↵` character, printed in a light gray color (similar to how IDEs do it).
  
  **before**
  ![2019-10-27_18-30](https://user-images.githubusercontent.com/33516116/67638694-d53a1c80-f8e7-11e9-9971-d022a1d90a17.png)
  
  **proposed after**
  ![2019-10-27_18-29](https://user-images.githubusercontent.com/33516116/67638696-e08d4800-f8e7-11e9-8a7d-acf41e2b1f8a.png)
  
  
  </issue>
  <code>
  [start of pydis_site/apps/staff/templatetags/deletedmessage_filters.py]
  1 from datetime import datetime
  2 
  3 from django import template
  4 
  5 register = template.Library()
  6 
  7 
  8 @register.filter
  9 def hex_colour(color: int) -> str:
  10     """Converts an integer representation of a colour to the RGB hex value."""
  11     return f"#{color:0>6X}"
  12 
  13 
  14 @register.filter
  15 def footer_datetime(timestamp: str) -> datetime:
  16     """Takes an embed timestamp and returns a timezone-aware datetime object."""
  17     return datetime.fromisoformat(timestamp)
  18
  [end of pydis_site/apps/staff/templatetags/deletedmessage_filters.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/pydis_site/apps/staff/templatetags/deletedmessage_filters.py b/pydis_site/apps/staff/templatetags/deletedmessage_filters.py
  --- a/pydis_site/apps/staff/templatetags/deletedmessage_filters.py
  +++ b/pydis_site/apps/staff/templatetags/deletedmessage_filters.py
  @@ -7,11 +7,22 @@
   
   @register.filter
   def hex_colour(color: int) -> str:
  -    """Converts an integer representation of a colour to the RGB hex value."""
  -    return f"#{color:0>6X}"
  +    """
  +    Converts an integer representation of a colour to the RGB hex value.
  +
  +    As we are using a Discord dark theme analogue, black colours are returned as white instead.
  +    """
  +    colour = f"#{color:0>6X}"
  +    return colour if colour != "#000000" else "#FFFFFF"
   
   
   @register.filter
   def footer_datetime(timestamp: str) -> datetime:
       """Takes an embed timestamp and returns a timezone-aware datetime object."""
       return datetime.fromisoformat(timestamp)
  +
  +
  +@register.filter
  +def visible_newlines(text: str) -> str:
  +    """Takes an embed timestamp and returns a timezone-aware datetime object."""
  +    return text.replace("\n", " <span class='has-text-grey'>↵</span><br>")
  
verification_info: {"golden_diff": "diff --git a/pydis_site/apps/staff/templatetags/deletedmessage_filters.py b/pydis_site/apps/staff/templatetags/deletedmessage_filters.py\n--- a/pydis_site/apps/staff/templatetags/deletedmessage_filters.py\n+++ b/pydis_site/apps/staff/templatetags/deletedmessage_filters.py\n@@ -7,11 +7,22 @@\n \n @register.filter\n def hex_colour(color: int) -> str:\n-    \"\"\"Converts an integer representation of a colour to the RGB hex value.\"\"\"\n-    return f\"#{color:0>6X}\"\n+    \"\"\"\n+    Converts an integer representation of a colour to the RGB hex value.\n+\n+    As we are using a Discord dark theme analogue, black colours are returned as white instead.\n+    \"\"\"\n+    colour = f\"#{color:0>6X}\"\n+    return colour if colour != \"#000000\" else \"#FFFFFF\"\n \n \n @register.filter\n def footer_datetime(timestamp: str) -> datetime:\n     \"\"\"Takes an embed timestamp and returns a timezone-aware datetime object.\"\"\"\n     return datetime.fromisoformat(timestamp)\n+\n+\n+@register.filter\n+def visible_newlines(text: str) -> str:\n+    \"\"\"Takes an embed timestamp and returns a timezone-aware datetime object.\"\"\"\n+    return text.replace(\"\\n\", \" <span class='has-text-grey'>\u21b5</span><br>\")\n", "issue": "Make newlines visible in the deleted messages front-end\nThe deleted messages front-end currently doesn't display newlines if they're consecutive, i.e., if the lines are otherwise empty (`\"\\n\\n\\n\\n\\n\\n\\n\\n\\n\"`). This makes it difficult to interpret what actually happened in chat. A good solution to this would be to make newlines character visible using the `\u21b5` character, printed in a light gray color (similar to how IDEs do it).\r\n\r\n**before**\r\n![2019-10-27_18-30](https://user-images.githubusercontent.com/33516116/67638694-d53a1c80-f8e7-11e9-9971-d022a1d90a17.png)\r\n\r\n**proposed after**\r\n![2019-10-27_18-29](https://user-images.githubusercontent.com/33516116/67638696-e08d4800-f8e7-11e9-8a7d-acf41e2b1f8a.png)\r\n\n", "before_files": [{"content": "from datetime import datetime\n\nfrom django import template\n\nregister = template.Library()\n\n\n@register.filter\ndef hex_colour(color: int) -> str:\n    \"\"\"Converts an integer representation of a colour to the RGB hex value.\"\"\"\n    return f\"#{color:0>6X}\"\n\n\n@register.filter\ndef footer_datetime(timestamp: str) -> datetime:\n    \"\"\"Takes an embed timestamp and returns a timezone-aware datetime object.\"\"\"\n    return datetime.fromisoformat(timestamp)\n", "path": "pydis_site/apps/staff/templatetags/deletedmessage_filters.py"}]}