We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Logo
qutebrowser still needs a logo!

Some random ideas:
- `qutebrowser` in some "cute" (fur?) font
- A `q` which is composed of a globe (because browsers need a globe) and a snake "hanging" around it. Ideally with either the snake or the globe being cute. :grin:


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `qutebrowser/misc/split.py`
Content:
```
1 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
2 
3 # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
4 #
5 # This file is part of qutebrowser.
6 #
7 # qutebrowser is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # qutebrowser is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with qutebrowser.  If not, see <http://www.gnu.org/licenses/>.
19 
20 """Our own fork of shlex.split with some added and removed features."""
21 
22 import re
23 
24 from qutebrowser.utils import log
25 
26 
27 class ShellLexer:
28 
29     """A lexical analyzer class for simple shell-like syntaxes.
30 
31     Based on Python's shlex, but cleaned up, removed some features, and added
32     some features useful for qutebrowser.
33 
34     Attributes:
35         FIXME
36     """
37 
38     def __init__(self, s):
39         self.string = s
40         self.whitespace = ' \t\r'
41         self.quotes = '\'"'
42         self.escape = '\\'
43         self.escapedquotes = '"'
44         self.keep = False
45         self.quoted = None
46         self.escapedstate = None
47         self.token = None
48         self.state = None
49         self.reset()
50 
51     def reset(self):
52         """Reset the state machine state to the defaults."""
53         self.quoted = False
54         self.escapedstate = ' '
55         self.token = ''
56         self.state = ' '
57 
58     def __iter__(self):  # noqa
59         """Read a raw token from the input stream."""
60         # pylint: disable=too-many-branches,too-many-statements
61         self.reset()
62         for nextchar in self.string:
63             if self.state == ' ':
64                 if self.keep:
65                     self.token += nextchar
66                 if nextchar in self.whitespace:
67                     if self.token or self.quoted:
68                         yield self.token
69                         self.reset()
70                 elif nextchar in self.escape:
71                     self.escapedstate = 'a'
72                     self.state = nextchar
73                 elif nextchar in self.quotes:
74                     self.state = nextchar
75                 else:
76                     self.token = nextchar
77                     self.state = 'a'
78             elif self.state in self.quotes:
79                 self.quoted = True
80                 if nextchar == self.state:
81                     if self.keep:
82                         self.token += nextchar
83                     self.state = 'a'
84                 elif (nextchar in self.escape and
85                         self.state in self.escapedquotes):
86                     if self.keep:
87                         self.token += nextchar
88                     self.escapedstate = self.state
89                     self.state = nextchar
90                 else:
91                     self.token += nextchar
92             elif self.state in self.escape:
93                 # In posix shells, only the quote itself or the escape
94                 # character may be escaped within quotes.
95                 if (self.escapedstate in self.quotes and
96                         nextchar != self.state and
97                         nextchar != self.escapedstate and not self.keep):
98                     self.token += self.state
99                 self.token += nextchar
100                 self.state = self.escapedstate
101             elif self.state == 'a':
102                 if nextchar in self.whitespace:
103                     self.state = ' '
104                     if self.token or self.quoted:
105                         yield self.token
106                         self.reset()
107                     if self.keep:
108                         yield nextchar
109                 elif nextchar in self.quotes:
110                     if self.keep:
111                         self.token += nextchar
112                     self.state = nextchar
113                 elif nextchar in self.escape:
114                     if self.keep:
115                         self.token += nextchar
116                     self.escapedstate = 'a'
117                     self.state = nextchar
118                 else:
119                     self.token += nextchar
120         if self.state in self.escape and not self.keep:
121             self.token += self.state
122         if self.token or self.quoted:
123             yield self.token
124 
125 
126 def split(s, keep=False):
127     """Split a string via ShellLexer.
128 
129     Args:
130         keep: Whether to keep are special chars in the split output.
131     """
132     lexer = ShellLexer(s)
133     lexer.keep = keep
134     tokens = list(lexer)
135     if not tokens:
136         return []
137     out = []
138     spaces = ""
139 
140     log.shlexer.vdebug("{!r} -> {!r}".format(s, tokens))
141 
142     for t in tokens:
143         if t.isspace():
144             spaces += t
145         else:
146             out.append(spaces + t)
147             spaces = ""
148     if spaces:
149         out.append(spaces)
150 
151     return out
152 
153 
154 def _combine_ws(parts, whitespace):
155     """Combine whitespace in a list with the element following it.
156 
157     Args:
158         parts: A list of strings.
159         whitespace: A string containing what's considered whitespace.
160 
161     Return:
162         The modified list.
163     """
164     out = []
165     ws = ''
166     for part in parts:
167         if not part:
168             continue
169         elif part in whitespace:
170             ws += part
171         else:
172             out.append(ws + part)
173             ws = ''
174     if ws:
175         out.append(ws)
176     return out
177 
178 
179 def simple_split(s, keep=False, maxsplit=None):
180     """Split a string on whitespace, optionally keeping the whitespace.
181 
182     Args:
183         s: The string to split.
184         keep: Whether to keep whitespace.
185         maxsplit: The maximum count of splits.
186 
187     Return:
188         A list of split strings.
189     """
190     whitespace = '\n\t '
191     if maxsplit == 0:
192         # re.split with maxsplit=0 splits everything, while str.split splits
193         # nothing (which is the behavior we want).
194         if keep:
195             return [s]
196         else:
197             return [s.strip(whitespace)]
198     elif maxsplit is None:
199         maxsplit = 0
200 
201     if keep:
202         pattern = '([' + whitespace + '])'
203         parts = re.split(pattern, s, maxsplit)
204         return _combine_ws(parts, whitespace)
205     else:
206         pattern = '[' + whitespace + ']'
207         parts = re.split(pattern, s, maxsplit)
208         parts[-1] = parts[-1].rstrip()
209         return [p for p in parts if p]
210
```
--- 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/qutebrowser/misc/split.py b/qutebrowser/misc/split.py
--- a/qutebrowser/misc/split.py
+++ b/qutebrowser/misc/split.py
@@ -127,7 +127,7 @@
     """Split a string via ShellLexer.
 
     Args:
-        keep: Whether to keep are special chars in the split output.
+        keep: Whether to keep special chars in the split output.
     """
     lexer = ShellLexer(s)
     lexer.keep = keep

{"golden_diff": "diff --git a/qutebrowser/misc/split.py b/qutebrowser/misc/split.py\n--- a/qutebrowser/misc/split.py\n+++ b/qutebrowser/misc/split.py\n@@ -127,7 +127,7 @@\n     \"\"\"Split a string via ShellLexer.\n \n     Args:\n-        keep: Whether to keep are special chars in the split output.\n+        keep: Whether to keep special chars in the split output.\n     \"\"\"\n     lexer = ShellLexer(s)\n     lexer.keep = keep\n", "issue": "Logo\nqutebrowser still needs a logo!\n\nSome random ideas:\n- `qutebrowser` in some \"cute\" (fur?) font\n- A `q` which is composed of a globe (because browsers need a globe) and a snake \"hanging\" around it. Ideally with either the snake or the globe being cute. :grin:\n\n", "before_files": [{"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# qutebrowser is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with qutebrowser.  If not, see <http://www.gnu.org/licenses/>.\n\n\"\"\"Our own fork of shlex.split with some added and removed features.\"\"\"\n\nimport re\n\nfrom qutebrowser.utils import log\n\n\nclass ShellLexer:\n\n    \"\"\"A lexical analyzer class for simple shell-like syntaxes.\n\n    Based on Python's shlex, but cleaned up, removed some features, and added\n    some features useful for qutebrowser.\n\n    Attributes:\n        FIXME\n    \"\"\"\n\n    def __init__(self, s):\n        self.string = s\n        self.whitespace = ' \\t\\r'\n        self.quotes = '\\'\"'\n        self.escape = '\\\\'\n        self.escapedquotes = '\"'\n        self.keep = False\n        self.quoted = None\n        self.escapedstate = None\n        self.token = None\n        self.state = None\n        self.reset()\n\n    def reset(self):\n        \"\"\"Reset the state machine state to the defaults.\"\"\"\n        self.quoted = False\n        self.escapedstate = ' '\n        self.token = ''\n        self.state = ' '\n\n    def __iter__(self):  # noqa\n        \"\"\"Read a raw token from the input stream.\"\"\"\n        # pylint: disable=too-many-branches,too-many-statements\n        self.reset()\n        for nextchar in self.string:\n            if self.state == ' ':\n                if self.keep:\n                    self.token += nextchar\n                if nextchar in self.whitespace:\n                    if self.token or self.quoted:\n                        yield self.token\n                        self.reset()\n                elif nextchar in self.escape:\n                    self.escapedstate = 'a'\n                    self.state = nextchar\n                elif nextchar in self.quotes:\n                    self.state = nextchar\n                else:\n                    self.token = nextchar\n                    self.state = 'a'\n            elif self.state in self.quotes:\n                self.quoted = True\n                if nextchar == self.state:\n                    if self.keep:\n                        self.token += nextchar\n                    self.state = 'a'\n                elif (nextchar in self.escape and\n                        self.state in self.escapedquotes):\n                    if self.keep:\n                        self.token += nextchar\n                    self.escapedstate = self.state\n                    self.state = nextchar\n                else:\n                    self.token += nextchar\n            elif self.state in self.escape:\n                # In posix shells, only the quote itself or the escape\n                # character may be escaped within quotes.\n                if (self.escapedstate in self.quotes and\n                        nextchar != self.state and\n                        nextchar != self.escapedstate and not self.keep):\n                    self.token += self.state\n                self.token += nextchar\n                self.state = self.escapedstate\n            elif self.state == 'a':\n                if nextchar in self.whitespace:\n                    self.state = ' '\n                    if self.token or self.quoted:\n                        yield self.token\n                        self.reset()\n                    if self.keep:\n                        yield nextchar\n                elif nextchar in self.quotes:\n                    if self.keep:\n                        self.token += nextchar\n                    self.state = nextchar\n                elif nextchar in self.escape:\n                    if self.keep:\n                        self.token += nextchar\n                    self.escapedstate = 'a'\n                    self.state = nextchar\n                else:\n                    self.token += nextchar\n        if self.state in self.escape and not self.keep:\n            self.token += self.state\n        if self.token or self.quoted:\n            yield self.token\n\n\ndef split(s, keep=False):\n    \"\"\"Split a string via ShellLexer.\n\n    Args:\n        keep: Whether to keep are special chars in the split output.\n    \"\"\"\n    lexer = ShellLexer(s)\n    lexer.keep = keep\n    tokens = list(lexer)\n    if not tokens:\n        return []\n    out = []\n    spaces = \"\"\n\n    log.shlexer.vdebug(\"{!r} -> {!r}\".format(s, tokens))\n\n    for t in tokens:\n        if t.isspace():\n            spaces += t\n        else:\n            out.append(spaces + t)\n            spaces = \"\"\n    if spaces:\n        out.append(spaces)\n\n    return out\n\n\ndef _combine_ws(parts, whitespace):\n    \"\"\"Combine whitespace in a list with the element following it.\n\n    Args:\n        parts: A list of strings.\n        whitespace: A string containing what's considered whitespace.\n\n    Return:\n        The modified list.\n    \"\"\"\n    out = []\n    ws = ''\n    for part in parts:\n        if not part:\n            continue\n        elif part in whitespace:\n            ws += part\n        else:\n            out.append(ws + part)\n            ws = ''\n    if ws:\n        out.append(ws)\n    return out\n\n\ndef simple_split(s, keep=False, maxsplit=None):\n    \"\"\"Split a string on whitespace, optionally keeping the whitespace.\n\n    Args:\n        s: The string to split.\n        keep: Whether to keep whitespace.\n        maxsplit: The maximum count of splits.\n\n    Return:\n        A list of split strings.\n    \"\"\"\n    whitespace = '\\n\\t '\n    if maxsplit == 0:\n        # re.split with maxsplit=0 splits everything, while str.split splits\n        # nothing (which is the behavior we want).\n        if keep:\n            return [s]\n        else:\n            return [s.strip(whitespace)]\n    elif maxsplit is None:\n        maxsplit = 0\n\n    if keep:\n        pattern = '([' + whitespace + '])'\n        parts = re.split(pattern, s, maxsplit)\n        return _combine_ws(parts, whitespace)\n    else:\n        pattern = '[' + whitespace + ']'\n        parts = re.split(pattern, s, maxsplit)\n        parts[-1] = parts[-1].rstrip()\n        return [p for p in parts if p]\n", "path": "qutebrowser/misc/split.py"}], "after_files": [{"content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of the License, or\n# (at your option) any later version.\n#\n# qutebrowser is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with qutebrowser.  If not, see <http://www.gnu.org/licenses/>.\n\n\"\"\"Our own fork of shlex.split with some added and removed features.\"\"\"\n\nimport re\n\nfrom qutebrowser.utils import log\n\n\nclass ShellLexer:\n\n    \"\"\"A lexical analyzer class for simple shell-like syntaxes.\n\n    Based on Python's shlex, but cleaned up, removed some features, and added\n    some features useful for qutebrowser.\n\n    Attributes:\n        FIXME\n    \"\"\"\n\n    def __init__(self, s):\n        self.string = s\n        self.whitespace = ' \\t\\r'\n        self.quotes = '\\'\"'\n        self.escape = '\\\\'\n        self.escapedquotes = '\"'\n        self.keep = False\n        self.quoted = None\n        self.escapedstate = None\n        self.token = None\n        self.state = None\n        self.reset()\n\n    def reset(self):\n        \"\"\"Reset the state machine state to the defaults.\"\"\"\n        self.quoted = False\n        self.escapedstate = ' '\n        self.token = ''\n        self.state = ' '\n\n    def __iter__(self):  # noqa\n        \"\"\"Read a raw token from the input stream.\"\"\"\n        # pylint: disable=too-many-branches,too-many-statements\n        self.reset()\n        for nextchar in self.string:\n            if self.state == ' ':\n                if self.keep:\n                    self.token += nextchar\n                if nextchar in self.whitespace:\n                    if self.token or self.quoted:\n                        yield self.token\n                        self.reset()\n                elif nextchar in self.escape:\n                    self.escapedstate = 'a'\n                    self.state = nextchar\n                elif nextchar in self.quotes:\n                    self.state = nextchar\n                else:\n                    self.token = nextchar\n                    self.state = 'a'\n            elif self.state in self.quotes:\n                self.quoted = True\n                if nextchar == self.state:\n                    if self.keep:\n                        self.token += nextchar\n                    self.state = 'a'\n                elif (nextchar in self.escape and\n                        self.state in self.escapedquotes):\n                    if self.keep:\n                        self.token += nextchar\n                    self.escapedstate = self.state\n                    self.state = nextchar\n                else:\n                    self.token += nextchar\n            elif self.state in self.escape:\n                # In posix shells, only the quote itself or the escape\n                # character may be escaped within quotes.\n                if (self.escapedstate in self.quotes and\n                        nextchar != self.state and\n                        nextchar != self.escapedstate and not self.keep):\n                    self.token += self.state\n                self.token += nextchar\n                self.state = self.escapedstate\n            elif self.state == 'a':\n                if nextchar in self.whitespace:\n                    self.state = ' '\n                    if self.token or self.quoted:\n                        yield self.token\n                        self.reset()\n                    if self.keep:\n                        yield nextchar\n                elif nextchar in self.quotes:\n                    if self.keep:\n                        self.token += nextchar\n                    self.state = nextchar\n                elif nextchar in self.escape:\n                    if self.keep:\n                        self.token += nextchar\n                    self.escapedstate = 'a'\n                    self.state = nextchar\n                else:\n                    self.token += nextchar\n        if self.state in self.escape and not self.keep:\n            self.token += self.state\n        if self.token or self.quoted:\n            yield self.token\n\n\ndef split(s, keep=False):\n    \"\"\"Split a string via ShellLexer.\n\n    Args:\n        keep: Whether to keep special chars in the split output.\n    \"\"\"\n    lexer = ShellLexer(s)\n    lexer.keep = keep\n    tokens = list(lexer)\n    if not tokens:\n        return []\n    out = []\n    spaces = \"\"\n\n    log.shlexer.vdebug(\"{!r} -> {!r}\".format(s, tokens))\n\n    for t in tokens:\n        if t.isspace():\n            spaces += t\n        else:\n            out.append(spaces + t)\n            spaces = \"\"\n    if spaces:\n        out.append(spaces)\n\n    return out\n\n\ndef _combine_ws(parts, whitespace):\n    \"\"\"Combine whitespace in a list with the element following it.\n\n    Args:\n        parts: A list of strings.\n        whitespace: A string containing what's considered whitespace.\n\n    Return:\n        The modified list.\n    \"\"\"\n    out = []\n    ws = ''\n    for part in parts:\n        if not part:\n            continue\n        elif part in whitespace:\n            ws += part\n        else:\n            out.append(ws + part)\n            ws = ''\n    if ws:\n        out.append(ws)\n    return out\n\n\ndef simple_split(s, keep=False, maxsplit=None):\n    \"\"\"Split a string on whitespace, optionally keeping the whitespace.\n\n    Args:\n        s: The string to split.\n        keep: Whether to keep whitespace.\n        maxsplit: The maximum count of splits.\n\n    Return:\n        A list of split strings.\n    \"\"\"\n    whitespace = '\\n\\t '\n    if maxsplit == 0:\n        # re.split with maxsplit=0 splits everything, while str.split splits\n        # nothing (which is the behavior we want).\n        if keep:\n            return [s]\n        else:\n            return [s.strip(whitespace)]\n    elif maxsplit is None:\n        maxsplit = 0\n\n    if keep:\n        pattern = '([' + whitespace + '])'\n        parts = re.split(pattern, s, maxsplit)\n        return _combine_ws(parts, whitespace)\n    else:\n        pattern = '[' + whitespace + ']'\n        parts = re.split(pattern, s, maxsplit)\n        parts[-1] = parts[-1].rstrip()\n        return [p for p in parts if p]\n", "path": "qutebrowser/misc/split.py"}]}