Skip to content

Commit

Permalink
Match new lines in discord bridge posts
Browse files Browse the repository at this point in the history
  • Loading branch information
mybearworld committed Jun 18, 2024
1 parent 9dc4a75 commit f2f5eac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/api/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const createPostsSlice: Slice<PostsSlice> = (set, get) => {
addPost: (post: Post) => {
const bridge = post.u === "Discord" ? "discord" : undefined;
const match = bridge
? post.p.match(/(?<username>[a-z0-9_\-]+): (?<post>.+)/i)
? post.p.match(/(?<username>[a-z0-9_\-]+): (?<post>[\s\S]+)/i)
: null;
const username = match?.groups?.username;
const postContent = match?.groups?.post;
Expand Down

0 comments on commit f2f5eac

Please sign in to comment.