Skip to content

Commit

Permalink
Merge pull request #212 from ErezBinyamin/master
Browse files Browse the repository at this point in the history
PR #210 bug fixes
  • Loading branch information
chubin authored Jun 15, 2020
2 parents 84a9ca3 + cc72fa8 commit 36c08be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/adapter/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def _get_command(self, topic, request_options=None):
cmd[0] = _get_abspath(cmd[0])

# cut oeis/ off
# Replace all non (alphanumeric, '-') chars with Spaces to delimit args to oeis.sh
# 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)
topic = re.sub('[^a-zA-Z0-9-:]+', ' ', topic)

return cmd + [topic]

Expand Down
3 changes: 2 additions & 1 deletion share/adapters/oeis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ oeis() (
| tr -d '()' \
| sort -u >> $TMP/list
[ $(wc -c < $TMP/list) -ne 0 ] && cat ${TMP}/list || printf "No code snippets available.\n"
else
elif [ $# -gt 1 ]
then
if [[ ${LANGUAGE^^} == 'MAPLE' ]] && grep -q 'MAPLE' $DOC
then
GREP_REGEX='MAPLE.*CROSSREFS'
Expand Down

0 comments on commit 36c08be

Please sign in to comment.