Treat . as punctuation

Closes #388
pull/392/head
Wilfred Hughes 2022-09-21 21:39:07 +07:00
parent af73c27cd2
commit c602503dec
2 changed files with 6 additions and 1 deletions

@ -1,5 +1,10 @@
## 0.37 (unreleased)
### Diffing
Standalone `.` is now considered punctuation in the diff cost model,
which improves diff results in some cases.
### Build
Fixed an issue with building on Windows with gcc.

@ -414,7 +414,7 @@ fn allocate_if_new<'syn, 'b>(
/// This check is deliberately conservative, becuase it's hard to
/// accurately recognise punctuation in a language-agnostic way.
fn looks_like_punctuation(content: &str) -> bool {
content == "," || content == ";"
content == "," || content == ";" || content == "."
}
/// Compute the neighbours of `v` if we haven't previously done so,