diff --git a/lib/adapter/cmd.py b/lib/adapter/cmd.py index be1df97..5e70c46 100644 --- a/lib/adapter/cmd.py +++ b/lib/adapter/cmd.py @@ -130,10 +130,10 @@ class AdapterOeis(CommandAdapter): 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] diff --git a/share/adapters/oeis.sh b/share/adapters/oeis.sh index 0a4b296..a88813c 100755 --- a/share/adapters/oeis.sh +++ b/share/adapters/oeis.sh @@ -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'