Skip to content

Commit

Permalink
feat: remove newline loader from dato
Browse files Browse the repository at this point in the history
  • Loading branch information
maxprilutskiy committed Feb 5, 2025
1 parent ba69efd commit e950be4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/odd-ducks-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"lingo.dev": patch
---

remove newline loader from dato
1 change: 0 additions & 1 deletion packages/cli/src/cli/loaders/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ export default function createBucketLoader(
case "dato":
return composeLoaders(
createDatoLoader(bucketPathPattern),
createNewLineLoader(),
createSyncLoader(),
createFlatLoader(),
createUnlocalizableLoader(),
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/cli/loaders/new-line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default function createNewLineLoader(): ILoader<string, string> {
if (!data) return "";

// Remove any existing final newline
console.log(data);
const trimmed = data.replace(/[\r\n]+$/, "");

// If original had final newline, add it back with same ending type
Expand Down

0 comments on commit e950be4

Please sign in to comment.