mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
remove : only in /:list (#212)
This commit is contained in:
+7
-1
@@ -133,7 +133,13 @@ class AdapterOeis(CommandAdapter):
|
||||
# Replace all non (alphanumeric, '-', ':') chars with Spaces to delimit args to oeis.sh
|
||||
if topic.startswith("oeis/"):
|
||||
topic = topic[5:]
|
||||
topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic)
|
||||
|
||||
suffix = ""
|
||||
if topic.endswith("/:list"):
|
||||
suffix = " :list"
|
||||
topic = topic[:-6]
|
||||
|
||||
topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic) + suffix
|
||||
|
||||
return cmd + [topic]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user