Skip to content

Commit

Permalink
remove : only in /:list (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
chubin committed Jun 15, 2020
1 parent 36c08be commit b5a1e12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/adapter/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,13 @@ def _get_command(self, topic, request_options=None):
# 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]

Expand Down

0 comments on commit b5a1e12

Please sign in to comment.