Canonicalize source checkout line endings
This commit is contained in:
parent
e0f3f00b3a
commit
b8e377278a
2 changed files with 9 additions and 5 deletions
|
|
@ -433,11 +433,15 @@ function comparableFields(document: ArchivedSourceDocumentRecord): Record<string
|
|||
path: document.path,
|
||||
language: document.language,
|
||||
title: document.title,
|
||||
content: document.content,
|
||||
content: canonicalizeLineEndings(document.content),
|
||||
metadata: document.metadata ?? {},
|
||||
};
|
||||
}
|
||||
|
||||
function canonicalizeLineEndings(content: string): string {
|
||||
return content.replace(/\r\n?/g, "\n");
|
||||
}
|
||||
|
||||
function compareDocuments(
|
||||
left: ArchivedSourceDocumentRecord,
|
||||
right: ArchivedSourceDocumentRecord,
|
||||
|
|
|
|||
Loading…
Reference in a new issue