Skip to content

Commit 1b5d8e7

Browse files
committed
Adjust date regex whitespace matching in patch header normalization
- [Pasted text] └── apps └── editor └── src ├── commands │ └── apply-response-command │ ├── apply-response-command.ts │ └── utils │ ├── preview │ │ └── preview.ts │ └── response-parser │ ├── index.ts │ ├── parsers │ │ ├── diff-parser │ │ │ ├── diff-parser.ts │ │ │ ├── helpers │ │ │ │ ├── index.ts │ │ │ │ └── patch-utils.ts │ │ │ ├── index.ts │ │ │ └── test │ │ │ └── diff-parser.spec.ts │ │ └── index.ts │ └── response-parser.ts ├── extension.ts ├── services │ ├── websocket-manager.ts │ └── websocket-server-process.ts └── views └── prompt └── backend ├── message-handlers │ └── handle-patch-repair.ts └── prompt-view-provider.ts
1 parent f74f8c9 commit 1b5d8e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/helpers

‎apps/editor/src/commands/apply-response-command/utils/response-parser/parsers/diff-parser/helpers/patch-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const normalize_header_line = (params: {
55
line: string
66
is_single_root: boolean
77
}): string => {
8-
const processed_line = params.line.replace(/\s+\d{4}-\d{2}-\d{2}.*$/, '')
8+
const processed_line = params.line.replace(/\s\d{4}-\d{2}-\d{2}.*$/, '')
99

1010
if (processed_line.startsWith('--- ')) {
1111
let path_part = strip_quotes(processed_line.substring(4).trim())

0 commit comments

Comments
 (0)