Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Simplify line normalization (#19712)
Conrad Irwinf8ab86f9302b
diff --git a/crates/text/src/text.rs b/crates/text/src/text.rsindex 380ced5253a..1d214fe0e14 100644--- a/crates/text/src/text.rs+++ b/crates/text/src/text.rs@@ -43,9 +43,8 @@ use undo_map::UndoMap;#[cfg(any(test, feature = "test-support"))]use util::RandomCharIter;-static LINE_SEPARATORS_REGEX: LazyLock<Regex> = LazyLock::new(|| {- Regex::new(r"\r\n|\r|\u{2028}|\u{2029}").expect("Failed to create LINE_SEPARATORS_REGEX")-});+static LINE_SEPARATORS_REGEX: LazyLock<Regex> =+ LazyLock::new(|| Regex::new(r"\r\n|\r").expect("Failed to create LINE_SEPARATORS_REGEX"));pub type TransactionId = clock::Lamport;