# Move @punctuation.delimiter before @operator capture \(\#41663\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 04e53bff3d96693a8c3e21188d17cc4e80abe97f

Requested commit: 04e53bff3d96693a8c3e21188d17cc4e80abe97f

Commit: 04e53bff3d96693a8c3e21188d17cc4e80abe97f

Tree: ea55d23ac8efda1182127bba54a88d445a80a237

Author: Dijana Pavlovic

Committer: GitHub

## Message

```
Move @punctuation.delimiter before @operator capture (#41663)

Closes #41593

From what I understand the order of captures inside tree-sitter query
files matters, and the last capture will win. `?` and `:` are captured
by both `@operator` and `@punctuation.delimiter`.So in order for the
ternary operator to win it should live after `@punctuation.delimiter`.

Before:
<img width="298" height="32" alt="Screenshot 2025-10-31 at 17 41 21"
src="https://github.com/user-attachments/assets/af376e52-88be-4f62-9e2b-a106731f8145"
/>


After:
<img width="303" height="39" alt="Screenshot 2025-10-31 at 17 41 33"
src="https://github.com/user-attachments/assets/9a754ae9-0521-4c70-9adb-90a562404ce8"
/>


Release Notes:

- Fixed an issue where the ternary operator symbols in TypeScript would
not be highlighted as operators.
```

## Parents

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

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