From 147c3d8debdc0747a86905bf378dca5486e83913 Mon Sep 17 00:00:00 2001 From: Hyu Date: Tue, 29 Sep 2026 14:42:57 +0800 Subject: [PATCH] chore: pin LF line endings for the docs repository Add .gitattributes with * text=auto eol=lf plus explicit binary markers. The repository stores LF, but with core.autocrlf=true a Windows checkout rewrites every text file to CRLF, which breaks assertions that depend on byte-exact content or LF-only patterns in the test suite. --- .gitattributes | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..ea8a6ae51 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,25 @@ +# This repository holds documentation and generated content only. +# +# Everything is authored, reviewed and hashed as LF, and the test suite +# depends on that: +# - tests/blog-articles.test.mjs compares checked-in image bytes and +# SHA-256 digests against scripts/blog-articles-manifest.json +# - tests/seo.test.mjs matches fenced code blocks with LF-only patterns +# (```yaml\n..., ```text\n...) +# Without this file a Windows checkout with core.autocrlf=true rewrites +# every text file to CRLF and those assertions fail for reasons that have +# nothing to do with the content. +* text=auto eol=lf + +# Explicit binary markers for assets; text=auto already detects these, but +# stating them keeps the intent obvious and survives future rule changes. +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.ico binary +*.webp binary +*.pdf binary +*.zip binary +*.woff binary +*.woff2 binary