# markdown_preview: Improve the link decoration logic \(\#39905\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/287314f415742c6861dfff5425072e34e7a578a7)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 287314f415742c6861dfff5425072e34e7a578a7

Requested commit: 287314f415742c6861dfff5425072e34e7a578a7

Commit: 287314f415742c6861dfff5425072e34e7a578a7

Tree: 4864a337c807cb2ab739cbae020f3ece8dc91f29

Author: Bartosz Kaszubowski

Committer: GitHub

## Message

```
markdown_preview: Improve the link decoration logic (#39905)

Closes #39838

Refs:
*
https://github.com/zed-industries/zed/pull/39149#issuecomment-3383015060

# How

After digging a bit more to find out why raw links are not colored in
Markdown renderer I have found a simpler approach to applying color
decoration, which also fixed the lack of colors on raw links mentioned
in issue and comment above.

Release Notes:

- Improved decoration logic for links in Markdown

# Preview

<img width="1712" height="820" alt="Screenshot 2025-10-09 at 23 39 09"
src="https://github.com/user-attachments/assets/3864cb6c-3fc6-4110-8067-6158cd4b58f5"
/>
```

## Parents

- [63e719fadf45755b623eb96c8796eaf195f51b37](https://git.cafe/gitcafe/zed/commit/63e719fadf45755b623eb96c8796eaf195f51b37?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/287314f415742c6861dfff5425072e34e7a578a7?format=markdown)
