# Fix off-by-one highlighting in hover tooltip · gitcafe/zed

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

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

Visibility: public

Requested revision: 98d514f5bf2c9a53519f462e084791551dc8f69b

Requested commit: 98d514f5bf2c9a53519f462e084791551dc8f69b

Commit: 98d514f5bf2c9a53519f462e084791551dc8f69b

Tree: 885be035ad948ef0351fba615031c73c58776340

Author: Conrad Irwin

Committer: Conrad Irwin

## Message

````
Fix off-by-one highlighting in hover tooltip

rust analyzer has a tendency to return markdown of the form:

```rust
 // <-- note the leading space
blah blah blah
```

This is clearly defectuous, so we used to .trim() the output.

Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.

Fix this by updating the highlighting when we trim.

````

## Parents

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

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