Skip to content

Commit

Permalink
feat: remove useless line breaks (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
johackim authored Jun 7, 2024
1 parent c38d67b commit 63d44ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default class ReadwisePlugin extends Plugin {
}
// write the actual files
const contents = await entry.getData(new zip.TextWriter());
let contentToSave = contents;
let contentToSave = contents.trim();

let originalName = processedFileName;
// extracting book ID from file name
Expand All @@ -290,7 +290,7 @@ export default class ReadwisePlugin extends Plugin {
if (await this.fs.exists(originalName)) {
// if the file already exists we need to append content to existing one
const existingContent = await this.fs.read(originalName);
contentToSave = existingContent + contents;
contentToSave = existingContent + contents.trim();
}
await this.fs.write(originalName, contentToSave);
await this.saveSettings();
Expand Down

0 comments on commit 63d44ae

Please sign in to comment.