From c6cc0108ca7738023b45e0eeac0fa2390532dd93 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 25 Oct 2024 00:47:47 +0200 Subject: Added vendor lock on deps --- .../github.com/alecthomas/chroma/v2/lexers/zed.go | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/zed.go (limited to 'vendor/github.com/alecthomas/chroma/v2/lexers/zed.go') diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/zed.go b/vendor/github.com/alecthomas/chroma/v2/lexers/zed.go new file mode 100644 index 0000000..aadc80f --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/zed.go @@ -0,0 +1,24 @@ +package lexers + +import ( + "strings" +) + +// Zed lexer. +func init() { // nolint: gochecknoinits + Get("Zed").SetAnalyser(func(text string) float32 { + if strings.Contains(text, "definition ") && strings.Contains(text, "relation ") && strings.Contains(text, "permission ") { + return 0.9 + } + if strings.Contains(text, "definition ") { + return 0.5 + } + if strings.Contains(text, "relation ") { + return 0.5 + } + if strings.Contains(text, "permission ") { + return 0.25 + } + return 0.0 + }) +} -- cgit v1.2.3