Add readme and yaml.yaml file

This commit is contained in:
Zachary Yedidia
2017-02-18 10:47:31 -05:00
parent c5a9df25ab
commit 3ef9cb838a
7 changed files with 187 additions and 6 deletions
+1 -5
View File
@@ -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