Repository navigation
Commit 0ac570a
committed
Improve diff processor to support CRLF endings and refine patch normalization and block parsing
- assess correctness of the processor
└── 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.ts1 parent d864d00 commit 0ac570a
3 files changed
Lines changed: 32 additions & 17 deletions
File tree
- apps/editor/src/utils/changes-integration/diff-processor
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 | | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
55 | 64 | | |
56 | 65 | | |
57 | 66 | | |
| |||
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
68 | | - | |
| 77 | + | |
| 78 | + | |
69 | 79 | | |
70 | | - | |
| 80 | + | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
0 commit comments