Marshall Bowers and Max
91bbf0efc4
assistant: Normalize line endings for prompts loaded from the prompt library ( #15708 )
...
This PR makes it so we normalize the line endings for prompts to LFs
(`\n`) when we load a prompt from the library.
In some cases, prompts could end up with CRLF (`\r\n`) line endings.
When these prompts were used with the `/prompt` slash command and
summarily run, the prompt text would be converted into a rope, causing
the line endings to be normalized to LFs.
However, this would happen _after_ the ranges for the
`SlashCommandOutputSection`s were computed based on the text that still
contained the CRLFs. This would then cause these ranges to be invalid
for the text with the normalized endings, resulting in a panic when
converting them to anchors.
Fixes https://github.com/zed-industries/zed/issues/15652 .
Release Notes:
- N/A
Co-authored-by: Max <max@zed.dev >
2024-08-02 18:13:17 -04:00
..
2024-07-19 11:13:15 +02:00
2024-07-31 16:31:11 +03:00
2024-06-27 14:36:44 -06:00
2024-08-02 18:13:17 -04:00
2024-08-02 18:13:17 -04:00
2024-05-29 18:06:45 -07:00
2024-07-29 14:21:29 -04:00
2024-07-17 18:58:44 -04:00
2024-07-25 20:22:01 +02:00
2024-07-23 15:01:05 -07:00
2024-07-30 16:39:33 +03:00
2024-07-30 17:38:16 -04:00
2024-07-10 17:36:22 +02:00
2024-08-01 22:26:07 +02:00
2024-07-26 16:42:21 -07:00
2024-07-19 12:48:48 -06:00
2024-08-02 15:46:06 -04:00
2024-06-18 12:22:37 -04:00
2024-07-16 12:01:59 -06:00
2024-07-31 17:43:08 +02:00
2024-08-02 20:08:57 +02:00
2024-08-01 17:34:44 -04:00
2024-08-01 17:34:44 -04:00
2024-07-30 11:12:37 +02:00
2024-07-26 16:42:21 -07:00
2024-07-31 17:43:08 +02:00
2024-07-23 15:01:05 -07:00
2024-07-30 16:39:33 +03:00
2024-07-29 14:21:41 +02:00
2024-07-25 18:04:47 +02:00
2024-04-30 23:31:59 -06:00
2024-07-25 22:48:42 +02:00
2024-07-23 15:01:05 -07:00
2024-07-23 15:01:05 -07:00
2024-07-23 11:32:37 -07:00
2024-07-28 11:07:10 +02:00
2024-07-31 17:43:08 +02:00
2024-07-24 16:36:01 -04:00
2024-07-16 12:01:59 -06:00
2024-07-01 17:18:58 -04:00
2024-07-30 11:12:37 +02:00
2024-07-18 09:27:05 -04:00
2024-07-23 15:01:05 -07:00
2024-07-23 19:48:41 +02:00
2024-08-02 19:51:26 +02:00
2024-08-02 17:16:18 +02:00
2024-07-30 09:32:58 +02:00
2024-08-02 15:22:01 +02:00
2024-07-25 20:22:01 +02:00
2024-07-26 21:10:56 -04:00
2024-07-25 22:48:42 +02:00
2024-07-28 23:13:13 -06:00
2024-07-26 11:08:42 -04:00
2024-07-23 09:56:45 -06:00
2024-07-15 17:04:15 -06:00
2024-08-02 19:51:26 +02:00
2024-07-27 10:24:05 -04:00
2024-06-22 16:07:36 -07:00
2024-07-24 11:21:31 +02:00
2024-08-01 22:26:07 +02:00
2024-07-23 11:32:37 -07:00
2024-07-24 16:36:01 -04:00
2024-08-02 15:46:06 -04:00
2024-07-25 09:00:53 -06:00
2024-07-13 21:59:14 +03:00
2024-08-01 13:51:34 -04:00
2024-07-31 18:58:07 -03:00
2024-07-19 11:13:15 +02:00
2024-08-01 22:26:07 +02:00
2024-07-26 12:52:59 -04:00
2024-07-30 16:39:33 +03:00
2024-06-20 15:00:54 +02:00
2024-07-28 22:45:00 -06:00
2024-07-26 21:38:34 -04:00
2024-07-31 17:43:08 +02:00
2024-07-25 22:48:42 +02:00
2024-08-02 19:51:26 +02:00
2024-07-31 12:05:19 -07:00
2024-07-31 18:57:55 -03:00
2024-07-30 16:18:53 +02:00
2024-07-29 17:05:56 +02:00
2024-07-30 13:09:50 +02:00
2024-07-27 14:00:03 -04:00
2024-07-22 00:57:34 +02:00
2024-07-10 09:40:50 +02:00
2024-07-09 12:15:34 -04:00
2024-06-21 16:32:32 -07:00
2024-05-09 11:03:33 +02:00
2024-07-27 14:12:32 -04:00
2024-07-28 10:52:39 +02:00
2024-07-23 15:01:05 -07:00
2024-07-23 15:01:05 -07:00
2024-07-31 08:48:19 -07:00
2024-07-28 22:45:00 -06:00
2024-07-26 18:19:53 +02:00
2024-07-26 03:31:41 -04:00
2024-07-31 10:54:58 -04:00
2024-08-01 15:08:48 +02:00
2024-07-28 10:52:39 +02:00
2024-07-27 12:28:50 -04:00
2024-07-25 21:30:48 -04:00
2024-07-24 16:25:52 -04:00
2024-04-15 14:21:52 +02:00
2024-07-30 17:38:16 -04:00
2024-08-01 21:57:51 -04:00
2024-07-08 17:05:30 -04:00
2024-07-30 16:39:33 +03:00
2024-07-15 10:23:18 -03:00
2024-07-29 09:22:25 -06:00
2024-07-23 19:48:41 +02:00
2024-08-01 15:08:48 +02:00
2024-08-01 16:09:53 +02:00
2024-08-01 13:59:21 -04:00
2024-07-30 17:38:16 -04:00