improve line ending docs
This commit is contained in:
parent
9f2a77e044
commit
a1bc14d38d
1 changed files with 6 additions and 0 deletions
|
|
@ -224,6 +224,12 @@ async function searchFiles(
|
|||
}
|
||||
|
||||
// Line ending detection and normalization utilities
|
||||
// These functions ensure consistent behavior across different platforms and Git configurations.
|
||||
// They handle the following scenarios:
|
||||
// - Windows CRLF (\r\n) vs Unix LF (\n) line endings
|
||||
// - Git's core.autocrlf setting converting line endings
|
||||
// - Mixed line endings within the same file
|
||||
// This makes the edit functionality reliable regardless of the development environment.
|
||||
function detectLineEnding(content: string): string {
|
||||
// Check if the content contains CRLF
|
||||
if (content.includes('\r\n')) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue