# markdown: Add debug_asserts for search result ordering \(\#59483\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 92399c67a1b187ae9495507f4d9b9fd6399794f4

Requested commit: 92399c67a1b187ae9495507f4d9b9fd6399794f4

Commit: 92399c67a1b187ae9495507f4d9b9fd6399794f4

Tree: 712da334554a71078d381c0721368f2c52308007

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
markdown: Add debug_asserts for search result ordering (#59483)

Follow up to #59473

The previous code could actually highlight the wrong match if you passed
in unordered ranges.
However, i realized that all codepaths are passing in ordered matches
already, so I just added some `debug_asserts` to ensure that this is
always the case.

Release Notes:

- N/A
```

## Parents

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

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