mirror of https://github.com/velour/catbase.git
Fix hilarious cat-astrophy
This commit is contained in:
parent
254d723ecf
commit
4cf4308ef8
|
@ -3,7 +3,9 @@
|
||||||
package picker
|
package picker
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -62,7 +64,7 @@ var pickerListItem = regexp.MustCompile(`^([^,]+),[ \t]+`)
|
||||||
|
|
||||||
func (p * PickerPlugin) parse(body string) (int, []string, error) {
|
func (p * PickerPlugin) parse(body string) (int, []string, error) {
|
||||||
subs := pickerListPrologue.FindStringSubmatch(body)
|
subs := pickerListPrologue.FindStringSubmatch(body)
|
||||||
if subs == nil {
|
if subs == nil && !strings.HasPrefix(body, "pick") {
|
||||||
return 0, nil, errors.New("saddle up for a syntax error")
|
return 0, nil, errors.New("saddle up for a syntax error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue