0ac17526687bf11007f0fbb5c3b2ff463ce47293
Fixes #12338, related to #37616 This change improves URL detection in the terminal by removing trailing periods that appear to be sentence punctuation rather than part of the URL structure. It builds upon the parentheses sanitization work from #37076 by consolidating both approaches into a unified `sanitize_url_punctuation` function. ## Changes - Combines parentheses and period sanitization into a single `sanitize_url_punctuation` function - Uses optimized single traversal with `fold()` for parentheses counting (addressing code review feedback) - Removes trailing periods using heuristics to distinguish sentence punctuation from legitimate URL components - Removes multiple trailing periods (always considered punctuation) - Removes single trailing periods when they appear after alphanumeric characters or slashes - Preserves periods that are part of legitimate URL structure (e.g., version numbers, IP addresses, subdomains) - Maintains existing parentheses balancing logic from #37076 ## Implementation Details - **Parentheses handling**: Counts opening and closing parentheses, removes trailing `)` when unbalanced - **Period handling**: Uses `take_while()` iterator for efficient period counting - **Performance**: Single pass counting with optimized loop to avoid redundant work - **Code clarity**: Uses let-else pattern for readable conditional logic ## Testing - Added comprehensive test coverage for both parentheses and period sanitization - Tests cover balanced vs unbalanced parentheses cases - Tests cover various period scenarios including legitimate URL periods vs sentence punctuation - All existing tests continue to pass ## Release Notes - Improved terminal URL detection by further trimming trailing punctuation. URLs ending with periods (like `https://example.com.`) and unbalanced parentheses (like `https://example.com/path)`) are now properly detected without including the trailing punctuation.
Extract a scheduler crate from GPUI to enable unified integration testing of client and server code (#37326)
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%