mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-05 16:37:20 -04:00
Add readme and yaml.yaml file
This commit is contained in:
+1
-5
@@ -1,10 +1,6 @@
|
||||
package highlight
|
||||
|
||||
import "bytes"
|
||||
|
||||
func DetectFiletype(defs []*Def, filename string, fileSrc []byte) *Def {
|
||||
firstLine := bytes.Split(fileSrc, []byte("\n"))[0]
|
||||
|
||||
func DetectFiletype(defs []*Def, filename string, firstLine []byte) *Def {
|
||||
for _, d := range defs {
|
||||
if d.ftdetect[0].Match([]byte(filename)) {
|
||||
return d
|
||||
|
||||
Reference in New Issue
Block a user