Skip to content

Commit

Permalink
Fixed line break issue on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ransome1 committed Sep 22, 2023
1 parent 0ec48ed commit c51585b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/modules/CreateTodoObjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { handleNotification } from './HandleNotification';
import { TodoObject, DateAttributes } from '../util';
import { extractSpeakingDates } from './Date';
import dayjs from 'dayjs';
import os from 'os';

let lines: string[];

function createTodoObjects(fileContent: string): TodoObject[] {
lines = fileContent.split(os.EOL);
lines = fileContent.split(/[\r\n]+/).filter(line => line.trim() !== '');
const todoObjects: TodoObject[] = lines
.map((line, i) => {
try {
Expand Down

0 comments on commit c51585b

Please sign in to comment.