1
0
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:
Igor Chubin
2020-06-15 19:13:24 +00:00
parent 36c08be8ce
commit b5a1e12d66
+7 -1
View File
@@ -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]