mirror of
https://github.com/Iheuzio/gpt-contextfiles.git
synced 2025-07-18 22:10:49 +00:00
fix(formatting): Files now formatted like it was previously when passed through
This commit is contained in:
parent
ff0f12953d
commit
6de20e93e7
@ -104,7 +104,8 @@ const openGPTContextPanelCommand = vscode.commands.registerCommand('extension.op
|
|||||||
const document = vscode.workspace.textDocuments.find(doc => doc.uri.fsPath === file.uri.fsPath);
|
const document = vscode.workspace.textDocuments.find(doc => doc.uri.fsPath === file.uri.fsPath);
|
||||||
if (document) {
|
if (document) {
|
||||||
const lines = document.getText().split('\n');
|
const lines = document.getText().split('\n');
|
||||||
return `${file.uri.fsPath}\n${lines.join('\n')}`;
|
const formattedLines = lines.map(line => `\t${line}`).join('\n');
|
||||||
|
return `${file.uri.fsPath}:\n\`\`\`\n${formattedLines}\n\`\`\``;
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user