Repository navigation
Commit 4e14825
committed
Enhance search and replace content processor with robust matching strategies and fallback handling
- create a minimal test that targets the change [Changes]
- add missing test cases [Pasted text]
- to `apps/editor/src/utils/changes-integration/search-replace-processor/apply-search-replace-to-content/apply-search-replace-to-content.spec.ts` add missing test cases
- what tests are missing?
- find dead code and remove it, together with comments
└── apps
└── editor
└── src
└── utils
└── changes-integration
└── search-replace-processor
├── apply-search-replace-to-content
│ ├── apply-search-replace-to-content.spec.ts
│ ├── apply-search-replace-to-content.ts
│ ├── index.ts
│ └── test-cases
│ ├── add-blank-line
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── adjacent-blocks-and-duplicate-snippets
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── basic-conflict
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── delete-first-line
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── deletion
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── expand-line-before-blank-line
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── extra-blank-lines-in-search
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── insert-after-context
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── insert-before-context
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── multiple-conflicts
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── multiple-seven-char-equals-underlines
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── noop-blocks
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── out-of-order-blocks
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── out-of-order-shrinking-block
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── out-of-order-with-duplicate-snippet
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── prepend-empty-search
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── preserve-boundary-blank-lines
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── remove-blank-line
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── reorder-without-context
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── rst-syntax
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── seven-char-equals-underline
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── similar-code-multiple-blocks
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── strict-match-precedence
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── trailing-blank-lines-diff
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ ├── trailing-whitespace
│ │ ├── expected.txt
│ │ ├── markers.txt
│ │ └── original.txt
│ └── whitespace-issues
│ ├── expected.txt
│ ├── markers.txt
│ └── original.txt
├── index.ts
├── parse-search-replace-segments.ts
└── types.ts1 parent b8d235c commit 4e14825
44 files changed
Lines changed: 824 additions & 197 deletions
File tree
- apps/editor/src/utils/changes-integration/search-replace-processor/apply-search-replace-to-content
- test-cases
- add-blank-line
- adjacent-blocks-and-duplicate-snippets
- expand-line-before-blank-line
- multiple-seven-char-equals-underlines
- noop-blocks
- out-of-order-blocks
- out-of-order-shrinking-block
- out-of-order-with-duplicate-snippet
- prepend-empty-search
- preserve-boundary-blank-lines
- remove-blank-line
- seven-char-equals-underline
- strict-match-precedence
- trailing-blank-lines-diff
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
89 | 145 | | |
90 | 146 | | |
0 commit comments