mirror of
https://github.com/erkin/ponysay.git
synced 2025-03-01 06:54:32 +01:00
ignore " " and "_" in --restriction
This commit is contained in:
parent
4dcbee5dc9
commit
fcc9b8edcd
2 changed files with 2 additions and 2 deletions
|
@ -607,7 +607,7 @@ class PonysayTool():
|
||||||
for c in 'ABCDEFGHIJKLMN OPQRSTUVWXYZ':
|
for c in 'ABCDEFGHIJKLMN OPQRSTUVWXYZ':
|
||||||
test = test.replace(c, '')
|
test = test.replace(c, '')
|
||||||
if (len(test) == 0) and (len(key) > 0):
|
if (len(test) == 0) and (len(key) > 0):
|
||||||
data.append((key, makeset(value)))
|
data.append((key, makeset(value.replace(' ', ''))))
|
||||||
everything.append(ponyfile[:-5], data)
|
everything.append(ponyfile[:-5], data)
|
||||||
import cPickle
|
import cPickle
|
||||||
with open(ponydir + 'metadata', 'wb') as file:
|
with open(ponydir + 'metadata', 'wb') as file:
|
||||||
|
|
|
@ -631,7 +631,7 @@ class Ponysay():
|
||||||
table = [(get_test(cell[:cell.index('=')],
|
table = [(get_test(cell[:cell.index('=')],
|
||||||
cell[cell.index('=') + 1:]
|
cell[cell.index('=') + 1:]
|
||||||
)
|
)
|
||||||
for cell in clause.lower().split('+'))
|
for cell in clause.lower().replace('_', '').replace(' ', '').split('+'))
|
||||||
for clause in restriction
|
for clause in restriction
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue