calibre/.gitattributes
Joseph Chiocchi 0590429d49
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]: 559a642694/docs/overrides.md


[recipes/ad.recipe]: aeb19dfedf/recipes/ad.recipe
[recipes/ambito_financiero.recipe]: aeb19dfedf/recipes/ambito_financiero.recipe
2024-02-15 17:20:07 -06:00

57 lines
1.3 KiB
Plaintext

# Tell git what files are txt
*.py text diff=python
*.pyj text diff=python
*.recipe text diff=python linguist-language=python
*.coffee text
*.js text
*.pot text
*.po text
*.html text
*.xhtml text
*.htm text
*.css text
*.rst text
*.md text
*.txt text
*.session text
*.cfg text
*.yaml text
*.svg text
*.xml text
*.xsl text
*.tmpl text
*.qrc text
*.sh text
*.fb2 text
*.bat text eol=crlf
# Tell git what files are binary
*.zip binary
*.epub binary
*.docx binary
*.jpg binary
*.jpeg binary
*.png binary
*.gif binary
*.pickle binary
*.pdf binary
# Prevent certain files from being exported:
.gitattributes export-ignore
.gitignore export-ignore
# Mark vendored files
resources/mathjax/* linguist-vendored=true
resources/coffee-script.js linguist-vendored=true
resources/csscolorparser.js linguist-vendored=true
resources/viewer/hyphen* linguist-vendored=true
resources/viewer/jquery* linguist-vendored=true
resources/stylelint-bundle.min.js linguist-vendored=true
src/hunspell linguist-vendored=true
# Mark generated files
resources/content-server/index-generated.html linguist-generated=true
resources/editor.js linguist-generated=true
resources/viewer.js linguist-generated=true
resources/viewer.html linguist-generated=true