ruff/crates/ruff_python_index/src
Auguste Lalande dacec7377c
Fix Indexer fails to identify continuation preceded by newline #10351 (#10354)
## Summary

Fixes #10351

It seems the bug was caused by this section of code

b669306c87/crates/ruff_python_index/src/indexer.rs (L55-L58)

It's true that newline tokens cannot be immediately followed by line
continuations, but only outside parentheses. e.g. the exception
```
(
    1
    \
    + 2)
```

But why was this check put there in the first place? Is it guarding
against something else?



## Test Plan

New test was added to indexer
2024-03-12 00:35:41 -04:00
..
comment_ranges.rs Approximate tokens len (#9546) 2024-01-19 17:39:37 +01:00
fstring_ranges.rs Track quoting style in the tokenizer (#10256) 2024-03-08 08:40:06 +00:00
indexer.rs Fix Indexer fails to identify continuation preceded by newline #10351 (#10354) 2024-03-12 00:35:41 -04:00
lib.rs Removing trailing whitespace inside multiline strings is unsafe (#9744) 2024-01-31 21:45:23 +00:00
multiline_ranges.rs Track quoting style in the tokenizer (#10256) 2024-03-08 08:40:06 +00:00