Remove unnecessary nil check

This commit is contained in:
rhysd 2022-07-31 20:54:35 +09:00
parent d77f38c53d
commit 638e1eec95

View file

@ -252,7 +252,7 @@ func (s *linkifyParser) Parse(parent ast.Node, block text.Reader, pc parser.Cont
}
at := bytes.IndexByte(line, '@')
m = []int{0, stop, at, stop - 1}
if m == nil || bytes.IndexByte(line[m[2]:m[3]], '.') < 0 {
if bytes.IndexByte(line[m[2]:m[3]], '.') < 0 {
return nil
}
lastChar := line[m[1]-1]