# Bovnar documents are BINARY-CAPABLE: an octet stream carries arbitrary bytes
# inline, which is one of the format's headline features. Line-ending
# normalisation is therefore unsound for them as a class -- and it had already
# done damage: `*.bvnr text eol=lf` ate two 0x0D bytes out of
# examples/octet_streams.bvnr (one of them inside the PNG magic 89 50 4E 47 0D 0A
# 1A 0A), so the committed blob was 226483 bytes against 226485 in the worktree
# and every clone, tarball and release archive shipped a file that fails
# `bovnar validate` with octet_stream_out_of_sync.
#
# -text: never convert, in either direction. Documents are written LF by
# convention; a tool that needs to enforce that should do it, not the filter.
*.bvnr -text

# BVF1 frame streams (the shared vectors in tests/stream_vectors/): a binary
# header before each document, so binary in every respect.
*.bvf binary

# GitHub Linguist: classify and (once the language is accepted upstream)
# highlight .bvnr files as "Bovnar". Until github/linguist ships the language,
# linguist-language is a harmless no-op; see dist/linguist/ for the submission.
*.bvnr linguist-language=Bovnar linguist-detectable=true

# Keep the browser-side highlighter copy under web/ (a duplicate of the canonical
# source) out of the repo's language statistics.
web/bovnar_highlight.js linguist-vendored=true

# Example documents are real Bovnar, not generated/vendored — leave detectable.
examples/*.bvnr linguist-language=Bovnar

# Shell scripts are run from the release archives, including the two built on
# Windows runners, where core.autocrlf=true would otherwise check them out CRLF
# and bash stops at the first $'\r'.
*.sh text eol=lf

# The Internet-Draft is written in doc/ietf/draft-*.md; the three files beside it
# are renderings (kramdown-rfc, then xml2rfc). The .xml ends in a compressed copy
# of the source, so one changed sentence rewrites some two thousand lines of it,
# and the .txt repaginates. Review the .md; check_ietf_draft.py holds the
# renderings to it.
doc/ietf/draft-*.xml linguist-generated=true
doc/ietf/draft-*.txt linguist-generated=true
doc/ietf/draft-*.html linguist-generated=true
