diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ec281a49..8c26675bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ### Parsing -Updated Clojure, Common Lisp and Zig parsers. +Updated Clojure, Common Lisp and Zig parsers. Improved parsing of +Kotlin. Text encoding detection is now stricter, fixing more cases where binary files were treated as text. diff --git a/src/parse/tree_sitter_parser.rs b/src/parse/tree_sitter_parser.rs index 8ad40d827..b25f56d38 100644 --- a/src/parse/tree_sitter_parser.rs +++ b/src/parse/tree_sitter_parser.rs @@ -648,9 +648,14 @@ pub(crate) fn from_language(language: guess::Language) -> TreeSitterConfig { // structure of complex types within, but it beats // ignoring nullable changes. // https://github.com/Wilfred/difftastic/issues/411 - atom_nodes: ["line_string_literal", "character_literal", "nullable_type"] - .into_iter() - .collect(), + atom_nodes: [ + "nullable_type", + "string_literal", + "line_string_literal", + "character_literal", + ] + .into_iter() + .collect(), delimiter_tokens: vec![("(", ")"), ("{", "}"), ("[", "]"), ("<", ">")] .into_iter() .collect(),