parent
f27ee60149
commit
19926d95fe
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
|||
package highlight
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
|
||||
|
@ -122,6 +123,10 @@ func ParseFtDetect(file *File) (r [2]*regexp.Regexp, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if loaded == 0 {
|
||||
return r, errors.New("No detect regexes found")
|
||||
}
|
||||
|
||||
return r, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue