Repository navigation
Commit c726dbf
committed
Refactor standard parser header handling to correctly merge conflict blocks with bold file paths
- add missing test case
- FAIL src/commands/apply-response-command/utils/response-parser/parsers/standard-parser/test/standard-parser.spec.ts (5.325 s) ● standard-parser › parse_response › merges content when merge conflicts have file path as bold text expect(received).toHaveLength(expected) Expected length: 1 Received length: 2 Received array: [{"content": "<<<<<<< ORIGINAL console.log(\"a\") ======= console.log(\"b\") >>>>>>> UPDATED", "file_path": "src/index.ts", "is_deleted": undefined, "renamed_from": undefined, "renamed_from_workspace": undefined, "type": "file", "workspace_name": undefined}, {"content": "<<<<<<< ORIGINAL console.log(\"c\") ======= console.log(\"d\") >>>>>>> UPDATED", "language": "typescript", "type": "inline-file"}]
└── apps
└── editor
└── src
└── commands
└── apply-response-command
└── utils
└── response-parser
└── parsers
└── standard-parser
├── helpers
│ ├── create-or-update-file-item.ts
│ ├── extract-and-set-workspace-path.ts
│ ├── flush-text-block.ts
│ └── process-conflict-markers.ts
├── standard-parser.ts
└── test
├── cases
│ └── merge-conflicts-file-path-as-bold-text
│ ├── 1-file.txt
│ └── merge-conflicts-file-path-as-bold-text.txt
└── standard-parser.spec.ts1 parent c6dc319 commit c726dbf
4 files changed
Lines changed: 62 additions & 48 deletions
File tree
- apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/standard-parser
- test
- cases/merge-conflicts-file-path-as-bold-text
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
72 | 81 | | |
73 | 82 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 83 | + | |
106 | 84 | | |
107 | 85 | | |
108 | | - | |
109 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
110 | 92 | | |
111 | 93 | | |
112 | 94 | | |
| |||
158 | 140 | | |
159 | 141 | | |
160 | 142 | | |
161 | | - | |
162 | 143 | | |
163 | 144 | | |
164 | 145 | | |
| |||
283 | 264 | | |
284 | 265 | | |
285 | 266 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | 267 | | |
296 | 268 | | |
297 | 269 | | |
| |||
479 | 451 | | |
480 | 452 | | |
481 | 453 | | |
482 | | - | |
483 | 454 | | |
484 | 455 | | |
485 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
| |||
0 commit comments