Skip to content

Build your personal knowledge base with Trilium Notes

chore(git): diff TypeScript sources as text

Elian Doran9e455aa6f140
diff --git a/.gitattributes b/.gitattributes
index 7b00e7d632..508388aa38 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -19,3 +19,8 @@ demo/**/*.txt eol=lf
demo/**/*.js eol=lf
demo/**/*.css eol=lf
*.sh eol=lf
+
+# Always diff TypeScript sources as text so a stray control byte (e.g. a NUL in
+# a string literal) doesn't make Git/GitHub treat the whole file as binary.
+*.ts diff
+*.tsx diff