f318bb5fd7790fe926bb8b972256037b7a90924d
HTML href elements (#42265)
This PR adds support for `HTML` href elements. It also refactored the way we stored the regions, this was done because otherwise I had to add 2 extra arguments to each `HTML` parser method. It's now also more inline with how we have done it for the highlights. **Small note**: the markdown parser only supports HTML href tags inside a paragraph tag. So adding them as a root node will result in just showing the inner text. This is a limitation of the markdown parser we use itself. **Before** <img width="935" height="174" alt="Screenshot 2025-11-08 at 15 40 28" src="https://github.com/user-attachments/assets/42172222-ed49-4a4b-8957-a46330e54c69" /> **After** <img width="1026" height="180" alt="Screenshot 2025-11-08 at 15 29 55" src="https://github.com/user-attachments/assets/9e139c2d-d43a-4952-8d1f-15eb92966241" /> **Example code** ```markdown <p>asd <a href="https://example.com">Link Text</a> more text</p> <p><a href="https://example.com">Link Text</a></p> [Duck Duck Go](https://duckduckgo.com) ``` **TODO**: - [x] Add tests cc @bennetbo Release Notes: - Markdown Preview: Add support for `HTML` href elements. --------- Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- 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/
258 MiB
Languages
Rust
95.6%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.6%
Other
0.3%