Fix hilarious cat-astrophy

This commit is contained in:
Steve McCoy 2018-08-30 14:20:44 -04:00 committed by GitHub
parent 254d723ecf
commit 4cf4308ef8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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")
} }