diff --git a/CHANGELOG.md b/CHANGELOG.md index ebc68b09a..8141c8fa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,9 @@ Diffs are now displayed with unchanged lines aligned to the other side. Improved Rust parsing to recognise lifetime syntax `'foo`, character -literals `'x'` and sequences of punctuation. +literals `'x'` and punctuation. -Improve punctuation parsing for OCaml and JS. +Improved punctuation parsing for OCaml and JS. Fixed an issue where the diff calculated may not be minimal. diff --git a/config/syntax.toml b/config/syntax.toml index 61037eb56..3052d89c4 100644 --- a/config/syntax.toml +++ b/config/syntax.toml @@ -156,7 +156,9 @@ atom_patterns = [ "'[a-z_]+", # Symbols (e.g. variable names) '[a-zA-Z0-9_]+!?', - # Operators + # Two character operators + '(::|&&|\|\|)', + # Single character operators # | is a delimiter for lambdas, but also used in pattern matching. '[.&=<>/*+:;,|#!?-]', ]