From cc1ffac60b2280ba305e2f354cb4808409d7efea Mon Sep 17 00:00:00 2001 From: friebetill Date: Tue, 14 Feb 2023 12:31:15 +0800 Subject: [PATCH] Reactivate ignoring line breaks at the end of the file --- src/components/differences_view.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/differences_view.ts b/src/components/differences_view.ts index adaf188..37270f8 100644 --- a/src/components/differences_view.ts +++ b/src/components/differences_view.ts @@ -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())