From 3c30113e91657ee4790dd76b463abebeb870b38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Henrique=20Guard=C3=A3o=20Gandarez?= Date: Fri, 18 Aug 2023 17:02:09 -0300 Subject: [PATCH] Fix priority for ApacheConf lexer as it conflicts with ISCdhcpd https://github.com/alecthomas/chroma/pull/772#issuecomment-1684329701 --- pkg/language/priority.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/language/priority.go b/pkg/language/priority.go index 6d593dd3..c5f5aedb 100644 --- a/pkg/language/priority.go +++ b/pkg/language/priority.go @@ -2,9 +2,12 @@ package language func priority(lang string) (float32, bool) { prios := map[string]float32{ - "FSharp": 0.01, - "Perl": 0.01, - // Higher priority than the TypoScriptLexer, as TypeScript is far more + // Higher priority than the ISCdhcpd, as this lexer defines *.conf + // filename pattern conflicting with ApacheConf lexer + "ApacheConf": 0.01, + "FSharp": 0.01, + "Perl": 0.01, + // Higher priority than the TypoScript, as TypeScript is far more // common these days "TypeScript": 0.5, }