MCPcopy
hub / github.com/micro-editor/micro / MatchFileName

Method MatchFileName

pkg/highlight/parser.go:158–164  ·  view source on GitHub ↗

MatchFileName will check the given file name with the stored regex

(filename string)

Source from the content-addressed store, hash-verified

156
157// MatchFileName will check the given file name with the stored regex
158func (header *Header) MatchFileName(filename string) bool {
159 if header.FileNameRegex != nil {
160 return header.FileNameRegex.MatchString(filename)
161 }
162
163 return false
164}
165
166func (header *Header) MatchFileHeader(firstLine []byte) bool {
167 if header.HeaderRegex != nil {

Callers 1

UpdateRulesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected