Skip to content

Commit 3e39d46

Browse files
committed
feat: linkedin post fix and comment
1 parent 70eebd5 commit 3e39d46

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,12 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
340340
type === 'personal'
341341
? `urn:li:person:${id}`
342342
: `urn:li:organization:${id}`,
343-
commentary: removeMarkdown({
344-
text: firstPost.message.replace('\n', '𝔫𝔢𝔴𝔩𝔦𝔫𝔢'),
345-
except: [/@\[(.*?)]\(urn:li:organization:(\d+)\)/g],
346-
}).replace('𝔫𝔢𝔴𝔩𝔦𝔫𝔢', '\n'),
343+
commentary: firstPost.message
344+
.replace(/\*/g, '\\*')
345+
.replace(/\(/g, '\\(')
346+
.replace(/\)/g, '\\)')
347+
.replace(/\{/g, '\\{')
348+
.replace(/}/g, '\\}'),
347349
visibility: 'PUBLIC',
348350
distribution: {
349351
feedDistribution: 'MAIN_FEED',

0 commit comments

Comments
 (0)