From 0590429d49f2b493870bfc49b5e84a079f18640e Mon Sep 17 00:00:00 2001 From: Joseph Chiocchi Date: Thu, 15 Feb 2024 17:20:07 -0600 Subject: [PATCH] Update .gitattributes - mark *.recipe as linguist-language=python Sometimes syntax highlighting is picked up correctly on GitHub which uses linguist[^1], when the `*.recipe` includes a shebang for python it will syntax highlight. Other times it does not. This change adds an attribute to `*.recipe` to mark it as a python language to linguist, following the documentation on overrides[^2]. Example without highlighting: [recipes/ad.recipe] Example with highlighting (python syntax picked up via shebang): [recipes/ambito_financiero.recipe] [^1]: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-repository-languages [^2]: https://github.com/github-linguist/linguist/blob/559a6426942abcae16b6d6b328147476432bf6cb/docs/overrides.md [recipes/ad.recipe]: https://github.com/kovidgoyal/calibre/blob/aeb19dfedfe14c5ee8d454c831d634e81219bf44/recipes/ad.recipe [recipes/ambito_financiero.recipe]: https://github.com/kovidgoyal/calibre/blob/aeb19dfedfe14c5ee8d454c831d634e81219bf44/recipes/ambito_financiero.recipe --- .gitattributes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index f518dcced2..b848ea562b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,7 @@ # Tell git what files are txt *.py text diff=python *.pyj text diff=python -*.recipe text diff=python +*.recipe text diff=python linguist-language=python *.coffee text *.js text *.pot text