Repository navigation
Commit 8438973
committed
Remove support for parsing diffs inside non-diff code blocks
- simplify `apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/diff-parser.ts` by not handling paths plased inside code blocks (don't touch tests)
└── apps
└── editor
└── src
└── commands
└── apply-response-command
└── utils
└── response-parser
└── parsers
└── diff-parser
├── diff-parser.ts
├── helpers
│ ├── block-utils.ts
│ ├── index.ts
│ ├── patch-utils.ts
│ └── path-utils.ts
├── index.ts
└── test
├── cases
│ ├── deletion-via-header
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── deletion-via-header.txt
│ ├── deletion-via-redundant-header
│ │ ├── 1-file.txt
│ │ └── deletion-via-redundant-header.txt
│ ├── file-deletion
│ │ ├── 1-file.txt
│ │ └── file-deletion.txt
│ ├── git-and-hunk-header-same-line
│ │ ├── 1-file.txt
│ │ └── git-and-hunk-header-same-line.txt
│ ├── git-broken-hunk-header
│ │ ├── 1-file.txt
│ │ └── git-broken-hunk-header.txt
│ ├── git-two-header-types
│ │ ├── 1-file.txt
│ │ └── git-two-header-types.txt
│ ├── ignore-ellipsis
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── ignore-ellipsis.txt
│ ├── inner-backticks
│ │ ├── 1-file.txt
│ │ └── inner-backticks.txt
│ ├── inner-triple-backticks
│ │ ├── 1-file.txt
│ │ └── inner-triple-backticks.txt
│ ├── markdown-missing-ending
│ │ ├── 1-file.txt
│ │ └── markdown-missing-ending.txt
│ ├── markdown-path-above
│ │ ├── 1-file.txt
│ │ └── markdown-path-above.txt
│ ├── markdown-path-above-no-hunk-header
│ │ ├── 1-file.txt
│ │ └── markdown-path-above-no-hunk-header.txt
│ ├── markdown-path-above-with-text-containing-path
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ └── markdown-path-above-with-text-containing-path.txt
│ ├── markdown-redundant-closing-backticks
│ │ ├── 1-file.txt
│ │ └── markdown-redundant-closing-backticks.txt
│ ├── markdown-repeated-path-above
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ └── markdown-repeated-path-above.txt
│ ├── markdown-unnecessary-empty-lines
│ │ ├── 1-file.txt
│ │ └── markdown-path-above.txt
│ ├── mix-delete-and-new-file
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── mix-delete-and-new-file.txt
│ ├── mix-new-file-from-heading-and-diff
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ ├── 3-file.txt
│ │ └── mix-new-file-from-heading-and-diff.txt
│ ├── mix-new-file-from-xml-tag-heading-and-diff
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ ├── 3-file.txt
│ │ └── mix-new-file-from-xml-tag-heading-and-diff.txt
│ ├── mix-new-file-xml-and-diff-variant-1
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── mix-new-file-xml-and-diff-variant-1.txt
│ ├── mix-new-file-xml-and-diff-variant-2
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── mix-new-file-xml-and-diff-variant-2.txt
│ ├── mix-rename-and-update
│ │ ├── 1-file.txt
│ │ └── mix-rename-and-update.txt
│ ├── mix-rename-one-liner-and-diff
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── mix-rename-one-liner-and-diff.txt
│ ├── multiple-edits-for-the-same-file
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ └── multiple-edits-for-the-same-file.txt
│ ├── multiple-files-git-and-hunk-header-same-line
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-git-and-hunk-header-same-line.txt
│ ├── multiple-files-no-markdown-block
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-no-markdown-block.txt
│ ├── multiple-files-no-prefix-single-markdown-block
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-no-prefix-single-markdown-block.txt
│ ├── multiple-files-same-line-backticks
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-same-line-backticks.txt
│ ├── multiple-files-separate-markdown-blocks
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-separate-markdown-blocks.txt
│ ├── multiple-files-single-markdown-block
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-single-markdown-block.txt
│ ├── multiple-files-text-between
│ │ ├── 1-text.txt
│ │ ├── 2-file.txt
│ │ ├── 3-text.txt
│ │ ├── 4-file.txt
│ │ ├── 5-text.txt
│ │ └── multiple-files-text-between.txt
│ ├── multiple-files-with-git-headers-no-file-lines
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-with-git-headers-no-file-lines.txt
│ ├── multiple-files-with-git-headers-separate-markdown-blocks
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-with-git-headers-separate-markdown-blocks.txt
│ ├── multiple-files-with-quoted-paths
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-with-quoted-paths.txt
│ ├── multiple-files-with-timestamps
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-files-with-timestamps.txt
│ ├── multiple-new-files-separate-markdown-blocks
│ │ ├── 1-file.txt
│ │ ├── 2-file.txt
│ │ └── multiple-new-files-separate-markdown-blocks.txt
│ ├── new-file-with-git-header
│ │ ├── 1-file.txt
│ │ └── new-file-with-git-header.txt
│ ├── no-markdown-or-git-header
│ │ ├── 1-file.txt
│ │ └── no-markdown-or-git-header.txt
│ ├── no-prefix
│ │ ├── 1-file.txt
│ │ └── no-prefix.txt
│ ├── non-diff-code-blocks
│ │ ├── 1-text.txt
│ │ ├── 2-inline-file.txt
│ │ ├── 3-file.txt
│ │ └── non-diff-code-blocks.txt
│ ├── rename
│ │ ├── 1-file.txt
│ │ └── rename.txt
│ ├── with-empty-lines-between
│ │ ├── 1-file.txt
│ │ └── with-empty-lines-between.txt
│ ├── with-git-header-no-file-lines
│ │ ├── 1-file.txt
│ │ └── with-git-header-no-file-lines.txt
│ ├── with-git-header-no-markdown
│ │ ├── 1-file.txt
│ │ └── with-git-header-no-markdown.txt
│ ├── with-quoted-paths
│ │ ├── 1-file.txt
│ │ └── with-quoted-paths.txt
│ ├── with-timestamps
│ │ ├── 1-file.txt
│ │ └── with-timestamps.txt
│ ├── with-xml-file-path
│ │ ├── 1-file.txt
│ │ └── with-xml-file-path.txt
│ ├── within-xml-tags
│ │ ├── 1-file.txt
│ │ └── within-xml-tags.txt
│ ├── within-xml-tags-unquoted-path
│ │ ├── 1-file.txt
│ │ └── within-xml-tags-unquoted-path.txt
│ └── within-xml-tags-with-cdata
│ ├── 1-file.txt
│ └── within-xml-tags-with-cdata.txt
└── diff-parser.spec.ts1 parent 7d604de commit 8438973
7 files changed
Lines changed: 1 addition & 111 deletions
File tree
- apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser
- test
- cases
- in-non-diff-code-block
- mix-new-file-and-diff
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
116 | | - | |
117 | 115 | | |
118 | 116 | | |
119 | 117 | | |
120 | | - | |
121 | 118 | | |
122 | 119 | | |
123 | 120 | | |
| |||
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | 168 | | |
204 | 169 | | |
205 | 170 | | |
206 | 171 | | |
207 | 172 | | |
208 | 173 | | |
209 | 174 | | |
210 | | - | |
211 | | - | |
212 | | - | |
| 175 | + | |
213 | 176 | | |
214 | 177 | | |
215 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | 141 | | |
158 | 142 | | |
159 | 143 | | |
| |||
438 | 422 | | |
439 | 423 | | |
440 | 424 | | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | 425 | | |
463 | 426 | | |
464 | 427 | | |
| |||
0 commit comments