Skip to content

Commit

Permalink
Merge pull request #1070 from Titan-Node/main
Browse files Browse the repository at this point in the history
fix: Fixed twitter posts include from including `/n` in the text
  • Loading branch information
monilpat authored Dec 14, 2024
2 parents 86a34e0 + 2b73a37 commit dd6a410
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/client-twitter/src/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ export class TwitterPostClient {
.replace(/^\s*{?\s*"text":\s*"|"\s*}?\s*$/g, '') // Remove JSON-like wrapper
.replace(/^['"](.*)['"]$/g, '$1') // Remove quotes
.replace(/\\"/g, '"') // Unescape quotes
.replace(/\\n/g, '\n') // Unescape newlines
.trim();
}

Expand Down

0 comments on commit dd6a410

Please sign in to comment.