1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

more resilliant cmd.py oerisAdapter parsing

This commit is contained in:
Your Name
2020-06-04 15:27:48 -04:00
parent 34a4745c01
commit eeee79c787
+3 -2
View File
@@ -130,9 +130,10 @@ class AdapterOeis(CommandAdapter):
cmd[0] = _get_abspath(cmd[0])
# cut oeis/ off
# Space delimiter for args to oeis.sh
# Replace all (non numeric and non '-')'s with Spaces to delimit args to oeis.sh
if topic.startswith("oeis/"):
topic = topic[5:].replace('+',' ')
topic = topic[5:]
topic = re.sub('[^0-9-]', ' ', topic)
return cmd + [topic]