# Restore direct use of the input text for Markdown \`Text\` \(\#27620\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e74af030656df20c595182c11549cf11eb5634ab

Requested commit: e74af030656df20c595182c11549cf11eb5634ab

Commit: e74af030656df20c595182c11549cf11eb5634ab

Tree: a5bfbe9a576c5d2886ec03fd9894fcc12da3a895

Author: Michael Sloan

Committer: GitHub

## Message

```
Restore direct use of the input text for Markdown `Text` (#27620)

PR #24388 changed the markdown parsing to copy parsed text in order to
handle markdown escaping, removing the optimization to instead reuse
text from the input.

Another issue with that change was that handling of finding links within
`Text` intermixed use of `text` and `parsed`, relying on the offsets
matching up (which I believe was true in practice).

The solution is to distinguish pulldown_cmark `Text` nodes that share
bytes with the input and those that do not.

Release Notes:

- N/A
```

## Parents

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

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