mirror of
https://github.com/chubin/cheat.sh.git
synced 2025-01-07 13:47:44 +03:00
more resilliant cmd.py oerisAdapter parsing
This commit is contained in:
parent
34a4745c01
commit
eeee79c787
@ -130,9 +130,10 @@ class AdapterOeis(CommandAdapter):
|
|||||||
cmd[0] = _get_abspath(cmd[0])
|
cmd[0] = _get_abspath(cmd[0])
|
||||||
|
|
||||||
# cut oeis/ off
|
# 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/"):
|
if topic.startswith("oeis/"):
|
||||||
topic = topic[5:].replace('+',' ')
|
topic = topic[5:]
|
||||||
|
topic = re.sub('[^0-9-]', ' ', topic)
|
||||||
|
|
||||||
return cmd + [topic]
|
return cmd + [topic]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user