This commit is contained in:
Andras Schmelczer 2025-01-12 11:34:45 +00:00
parent e6ffe8cbdc
commit eee78fd1a7
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -80,7 +80,7 @@ pub fn is_binary(data: &[u8]) -> bool {
pub fn is_file_type_mergable(path_or_file_name: &str) -> bool {
set_panic_hook();
let file_extension = path_or_file_name.split('.').last().unwrap_or_default();
let file_extension = path_or_file_name.split('.').next_back().unwrap_or_default();
matches!(file_extension.to_lowercase().as_str(), "md" | "txt")
}