Skip to content

Commit

Permalink
Treat Newick and Racket as lisps
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Mar 3, 2023
1 parent 0398506 commit 045d6a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## 0.45 (unreleased)

### Diffing

Racket and Newick are now treated as lisps for the purposes for
parenthesis heuristics.

### Parsing

Improved parsing for Makefiles.
Expand Down
2 changes: 1 addition & 1 deletion sample_files/compare.expected
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ sample_files/nesting_before.el sample_files/nesting_after.el
9fcf6b8adf148cdae47bc3a5f8068e41 -

sample_files/newick_before.nwk sample_files/newick_after.nwk
4778aef7b901b2cc7f9ad3601f87864d -
2919522e564dad74183ef2411bfc3111 -

sample_files/nix_before.nix sample_files/nix_after.nix
09a56752c1eb7f3f5c10d631a01973fc -
Expand Down
2 changes: 1 addition & 1 deletion src/diff/sliders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn prefer_outer_delimiter(language: guess_language::Language) -> bool {
match language {
// For Lisp family languages, we get the best result with the
// outer delimiter.
EmacsLisp | Clojure | CommonLisp | Janet => true,
EmacsLisp | Clojure | CommonLisp | Janet | Racket | Newick => true,
// JSON and TOML are like Lisp: the outer delimiter in an array object
// is the most relevant.
Json | Toml | Hcl => true,
Expand Down

0 comments on commit 045d6a2

Please sign in to comment.