Dolda2000 GitWeb
/
utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c848a4b
)
ann.py: Fixed searching for names beginning with "a ".
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 22 Dec 2019 03:22:49 +0000
(
04:22
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 22 Dec 2019 03:22:49 +0000
(
04:22
+0100)
ann.py
patch
|
blob
|
blame
|
history
diff --git
a/ann.py
b/ann.py
index
ee3d472
..
935e0a9
100644
(file)
--- a/
ann.py
+++ b/
ann.py
@@
-157,7
+157,7
@@
class anime(object):
linkpat = re.compile("^/encyclopedia/anime\\.php\\?id=(\d+)$")
def getlist(name):
- name = s(name, "^
the
\s+", "")
+ name = s(name, "^
(the|a)
\s+", "")
if len(name) < 1:
raise error("list() needs a prefix of at least one character")
fc = name[0]
@@
-173,6
+173,7
@@
def getlist(name):
for el in link.font:
if isinstance(el, str):
mn += el.strip()
+ mn = s(mn, "^a\s+", "")
if mn.lower().startswith(name.lower()):
m = linkpat.match(link["href"])
if not m: