From 60e407d4a639fd79d1cb7160dfb7fa44bad17d63 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 6 Dec 2024 13:20:41 +0000 Subject: [PATCH] refactor: - Simplify code, by reusing 'line' parameter --- src/Obsidian/FileParser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Obsidian/FileParser.ts b/src/Obsidian/FileParser.ts index acb88161ea..6968f48683 100644 --- a/src/Obsidian/FileParser.ts +++ b/src/Obsidian/FileParser.ts @@ -120,7 +120,7 @@ export class FileParser { ) { if (listItem.task === undefined) { const parentListItem: ListItem | null = this.line2ListItem.get(listItem.parent) ?? null; - this.line2ListItem.set(lineNumber, new ListItem(this.fileLines[lineNumber], parentListItem)); + this.line2ListItem.set(lineNumber, new ListItem(line, parentListItem)); return sectionIndex; } let task;