Reactivate ignoring line breaks at the end of the file

This commit is contained in:
friebetill 2023-02-14 12:31:15 +08:00
parent dd5a1fc2b8
commit cc1ffac60b

View file

@ -71,10 +71,14 @@ export class DifferencesView extends ItemView {
this.file2Content = await this.app.vault.read(this.file2)
this.file1Lines = this.file1Content
// Remove trailing new lines as this removes edge cases
.trimEnd()
.split('\n')
// Streamline empty lines at the end as this remove edge cases
.map((line) => line.trimEnd())
this.file2Lines = this.file2Content
// Remove trailing new lines as this removes edge cases
.trimEnd()
.split('\n')
// Streamline empty lines at the end as this remove edge cases
.map((line) => line.trimEnd())