mirror of https://github.com/velour/catbase.git
Use literal strings for these regexps
This commit is contained in:
parent
80d44a144d
commit
4886cd6b9d
|
@ -57,8 +57,8 @@ func (p *PickerPlugin) Message(message msg.Message) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
var pickerListPrologue = regexp.MustParse("^pick[ \t]+([0-9]*)[ \t]+\{[ \t]+")
|
var pickerListPrologue = regexp.MustParse(`^pick[ \t]+([0-9]*)[ \t]+\{[ \t]+`)
|
||||||
var pickerListItem = regexp.MustParse("^([^,]+),[ \t]+")
|
var pickerListItem = regexp.MustParse(`^([^,]+),[ \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)
|
||||||
|
|
Loading…
Reference in New Issue