Files
langchain/libs/text-splitters/langchain_text_splitters
Deepak Bhagat cd80a805b2 fix(text-splitters): remove invalid and duplicate separators in Kotlin, Rust, and Haskell (#37039)
## Summary

Fixes four issues in `get_separators_for_language()` in `character.py`:

- **Kotlin**: removed `"\ncase "` — `case` is not a Kotlin keyword.
Kotlin uses `when` expressions (already present in the list). This was
copied from Java/Swift.
- **Rust**: removed duplicate `"\nconst "` — appeared twice, once under
function definitions and again under control flow statements.
- **Haskell**: removed duplicate `"\n:: "` — appeared under function
definitions and again under type declarations.
- **Haskell**: removed duplicate `"\ndata "` — appeared under type
declarations and again under record field declarations.

All four are dead separators that never match or produce redundant
splits.

## Issue

Closes #37038

## Types of changes

- [x] Bug fix

## Checklist

- [x] I have read the CONTRIBUTING doc
- [x] Lint and unit tests pass locally with my changes
2026-04-27 15:08:12 -04:00
..
2026-01-23 23:07:36 -05:00