We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Monospaced font for text/plain long_description
Don't you think that would be nice to wrap project descriptions in text/plain with pre tag?
Close if duplicate. I'm really sorry, looking through over 400 issues of production system is beyond of my capabilities.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `warehouse/utils/readme.py`
Content:
```
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12 
13 """Utils for rendering and updating package descriptions (READMEs)."""
14 
15 import cgi
16 
17 import pkg_resources
18 import readme_renderer.markdown
19 import readme_renderer.rst
20 import readme_renderer.txt
21 
22 _RENDERERS = {
23     None: readme_renderer.rst,  # Default if description_content_type is None
24     "": readme_renderer.rst,  # Default if description_content_type is None
25     "text/plain": readme_renderer.txt,
26     "text/x-rst": readme_renderer.rst,
27     "text/markdown": readme_renderer.markdown,
28 }
29 
30 
31 def render(value, content_type=None, use_fallback=True):
32     if value is None:
33         return value
34 
35     content_type, parameters = cgi.parse_header(content_type or "")
36 
37     # Get the appropriate renderer
38     renderer = _RENDERERS.get(content_type, readme_renderer.txt)
39 
40     # Actually render the given value, this will not only render the value, but
41     # also ensure that it's had any disallowed markup removed.
42     rendered = renderer.render(value, **parameters)
43 
44     # If the content was not rendered, we'll render as plaintext instead. The
45     # reason it's necessary to do this instead of just accepting plaintext is
46     # that readme_renderer will deal with sanitizing the content.
47     # Skip the fallback option when validating that rendered output is ok.
48     if use_fallback and rendered is None:
49         rendered = readme_renderer.txt.render(value)
50 
51     return rendered
52 
53 
54 def renderer_version():
55     return pkg_resources.get_distribution("readme-renderer").version
56
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/warehouse/utils/readme.py b/warehouse/utils/readme.py
--- a/warehouse/utils/readme.py
+++ b/warehouse/utils/readme.py
@@ -41,6 +41,10 @@
     # also ensure that it's had any disallowed markup removed.
     rendered = renderer.render(value, **parameters)
 
+    # Wrap plaintext as preformatted to preserve whitespace.
+    if content_type == "text/plain":
+        rendered = f"<pre>{rendered}</pre>"
+
     # If the content was not rendered, we'll render as plaintext instead. The
     # reason it's necessary to do this instead of just accepting plaintext is
     # that readme_renderer will deal with sanitizing the content.

{"golden_diff": "diff --git a/warehouse/utils/readme.py b/warehouse/utils/readme.py\n--- a/warehouse/utils/readme.py\n+++ b/warehouse/utils/readme.py\n@@ -41,6 +41,10 @@\n     # also ensure that it's had any disallowed markup removed.\n     rendered = renderer.render(value, **parameters)\n \n+    # Wrap plaintext as preformatted to preserve whitespace.\n+    if content_type == \"text/plain\":\n+        rendered = f\"<pre>{rendered}</pre>\"\n+\n     # If the content was not rendered, we'll render as plaintext instead. The\n     # reason it's necessary to do this instead of just accepting plaintext is\n     # that readme_renderer will deal with sanitizing the content.\n", "issue": "Monospaced font for text/plain long_description\nDon't you think that would be nice to wrap project descriptions in text/plain with pre tag?\r\nClose if duplicate. I'm really sorry, looking through over 400 issues of production system is beyond of my capabilities.\n", "before_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Utils for rendering and updating package descriptions (READMEs).\"\"\"\n\nimport cgi\n\nimport pkg_resources\nimport readme_renderer.markdown\nimport readme_renderer.rst\nimport readme_renderer.txt\n\n_RENDERERS = {\n    None: readme_renderer.rst,  # Default if description_content_type is None\n    \"\": readme_renderer.rst,  # Default if description_content_type is None\n    \"text/plain\": readme_renderer.txt,\n    \"text/x-rst\": readme_renderer.rst,\n    \"text/markdown\": readme_renderer.markdown,\n}\n\n\ndef render(value, content_type=None, use_fallback=True):\n    if value is None:\n        return value\n\n    content_type, parameters = cgi.parse_header(content_type or \"\")\n\n    # Get the appropriate renderer\n    renderer = _RENDERERS.get(content_type, readme_renderer.txt)\n\n    # Actually render the given value, this will not only render the value, but\n    # also ensure that it's had any disallowed markup removed.\n    rendered = renderer.render(value, **parameters)\n\n    # If the content was not rendered, we'll render as plaintext instead. The\n    # reason it's necessary to do this instead of just accepting plaintext is\n    # that readme_renderer will deal with sanitizing the content.\n    # Skip the fallback option when validating that rendered output is ok.\n    if use_fallback and rendered is None:\n        rendered = readme_renderer.txt.render(value)\n\n    return rendered\n\n\ndef renderer_version():\n    return pkg_resources.get_distribution(\"readme-renderer\").version\n", "path": "warehouse/utils/readme.py"}], "after_files": [{"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Utils for rendering and updating package descriptions (READMEs).\"\"\"\n\nimport cgi\n\nimport pkg_resources\nimport readme_renderer.markdown\nimport readme_renderer.rst\nimport readme_renderer.txt\n\n_RENDERERS = {\n    None: readme_renderer.rst,  # Default if description_content_type is None\n    \"\": readme_renderer.rst,  # Default if description_content_type is None\n    \"text/plain\": readme_renderer.txt,\n    \"text/x-rst\": readme_renderer.rst,\n    \"text/markdown\": readme_renderer.markdown,\n}\n\n\ndef render(value, content_type=None, use_fallback=True):\n    if value is None:\n        return value\n\n    content_type, parameters = cgi.parse_header(content_type or \"\")\n\n    # Get the appropriate renderer\n    renderer = _RENDERERS.get(content_type, readme_renderer.txt)\n\n    # Actually render the given value, this will not only render the value, but\n    # also ensure that it's had any disallowed markup removed.\n    rendered = renderer.render(value, **parameters)\n\n    # Wrap plaintext as preformatted to preserve whitespace.\n    if content_type == \"text/plain\":\n        rendered = f\"<pre>{rendered}</pre>\"\n\n    # If the content was not rendered, we'll render as plaintext instead. The\n    # reason it's necessary to do this instead of just accepting plaintext is\n    # that readme_renderer will deal with sanitizing the content.\n    # Skip the fallback option when validating that rendered output is ok.\n    if use_fallback and rendered is None:\n        rendered = readme_renderer.txt.render(value)\n\n    return rendered\n\n\ndef renderer_version():\n    return pkg_resources.get_distribution(\"readme-renderer\").version\n", "path": "warehouse/utils/readme.py"}]}