# python: Improve docstring highlighting \(\#31628\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9cc1851be7aad564d5382ad6880c2679686e366b

Requested commit: 9cc1851be7aad564d5382ad6880c2679686e366b

Commit: 9cc1851be7aad564d5382ad6880c2679686e366b

Tree: e2946d8bcc82f01f8e44f76317601f33cf265939

Author: Finn Evers

Committer: GitHub

## Message

```
python: Improve docstring highlighting (#31628)

This PR broadens the highlighting for docstrings in Python. 

Previously, only the first docstring for e.g. type aliases was
highlighted in Python files. This happened as only the first occurrence
in the module was considered a docstring. With this change, now all
existing docstrings are actually highlighted as such.

| `main` | This PR | 
| --- | --- |
|
![main](https://github.com/user-attachments/assets/facc96a9-4e98-4063-8b93-d6e9884221ff)
|
![PR](https://github.com/user-attachments/assets/9da557a1-b327-466a-be87-65d6a811e24c)
|

Release Notes:

- Added more docstring highlights for Python.
```

## Parents

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

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