Repository navigation
Commit fa6356c
committed
Strip zero-width and BOM characters during diff normalization, search-replace, and truncation matching
- [Pasted text] - is not the same as -
- is something like this [Changes] needed in other processors?
└── apps
└── editor
└── src
└── utils
└── changes-integration
├── diff-processor
│ ├── diff-processor.spec.ts
│ ├── diff-processor.ts
│ ├── index.ts
│ ├── test-cases
│ │ ├── deletion-only
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── empty-file
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── empty-file-2
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── failing
│ │ │ ├── diff.txt
│ │ │ └── original.txt
│ │ ├── failing-2
│ │ │ ├── diff.txt
│ │ │ └── original.txt
│ │ ├── generic-1
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-2
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-3
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-4
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-5
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-6
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-7
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-8
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── generic-9
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── insert-start-end
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── loose-gap-match
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── multiple-hunks
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ ├── redundant-new-empty-line
│ │ │ ├── diff.txt
│ │ │ ├── expected.txt
│ │ │ └── original.txt
│ │ └── same-line-replace
│ │ ├── diff.txt
│ │ ├── expected.txt
│ │ └── original.txt
│ ├── types.ts
│ └── utils
│ ├── apply-blocks.ts
│ ├── empty-file-handler.ts
│ ├── match-blocks.ts
│ ├── normalize.ts
│ └── parse-blocks.ts
├── search-replace-processor
│ ├── apply-search-replace-to-content
│ │ ├── apply-search-replace-to-content.ts
│ │ └── index.ts
│ ├── index.ts
│ ├── parse-search-replace-segments.ts
│ └── types.ts
└── truncations-processor
├── index.ts
├── test-cases
│ ├── basic
│ │ ├── expected.txt
│ │ ├── original.txt
│ │ └── truncated.txt
│ ├── edge-truncations
│ │ ├── expected.txt
│ │ ├── original.txt
│ │ └── truncated.txt
│ ├── multiple-truncations
│ │ ├── expected.txt
│ │ ├── original.txt
│ │ └── truncated.txt
│ └── update-after-truncation
│ ├── expected.txt
│ ├── original.txt
│ └── truncated.txt
├── truncations-processor.spec.ts
├── truncations-processor.ts
└── utils
├── find-line-sequence.ts
└── is-truncation-line.ts1 parent 9659579 commit fa6356c
4 files changed
Lines changed: 26 additions & 13 deletions
File tree
- apps/editor/src/utils/changes-integration
- diff-processor/utils
- search-replace-processor/apply-search-replace-to-content
- truncations-processor
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | | - | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
0 commit comments