From a73375d0df73b22ce22d42221ca618793528f25b Mon Sep 17 00:00:00 2001 From: Amir Aharoni Date: Thu, 25 Feb 2021 13:54:01 +0200 Subject: [PATCH] Add a newline to the end of language-data.json This helps Git and Vim be less confused about diffs. It somehow sometimes happens that a newline is added to the end of language-data.json, but sometimes it is not added, and then Git diff shows it as removed or added. This change ensures that it's always added. --- src/util/ulsdata2json.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/ulsdata2json.php b/src/util/ulsdata2json.php index d8b960c..a259550 100644 --- a/src/util/ulsdata2json.php +++ b/src/util/ulsdata2json.php @@ -107,7 +107,7 @@ foreach ( $parsedLangdb['territories'] as $territoryCode => $languages ) { } print "Writing JSON langdb...\n"; -$jsonVerbose = json_encode( $parsedLangdb, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ); +$jsonVerbose = json_encode( $parsedLangdb, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) . "\n"; // For making diff review easier. file_put_contents( DATA_DIRECTORY . '/language-data.json', $jsonVerbose );