A human-friendly DSL for ATProto Lexicons
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add newline at the end of a generated Lexicon file

Files usually have newlines at the end. Especially when they are
edited manually. In order to prevent pure whitespace changes on
newline vs. no newline at the end of the file, always add a newline.

+1 -1
+1 -1
mlf-cli/src/generate/lexicon.rs
··· 181 181 }; 182 182 183 183 let json_str = serde_json::to_string_pretty(&json_lexicon).unwrap(); 184 - if let Err(source) = std::fs::write(&output_path, json_str) { 184 + if let Err(source) = std::fs::write(&output_path, format!("{}\n", json_str)) { 185 185 errors.push((output_path.display().to_string(), format!("Failed to write file: {}", source))); 186 186 continue; 187 187 }