Skip to content

Commit

Permalink
feat: linkedin post fix and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nevo-david committed Dec 4, 2024
1 parent 70eebd5 commit 3e39d46
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,12 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
type === 'personal'
? `urn:li:person:${id}`
: `urn:li:organization:${id}`,
commentary: removeMarkdown({
text: firstPost.message.replace('\n', '𝔫𝔢𝔴𝔩𝔦𝔫𝔢'),
except: [/@\[(.*?)]\(urn:li:organization:(\d+)\)/g],
}).replace('𝔫𝔢𝔴𝔩𝔦𝔫𝔢', '\n'),
commentary: firstPost.message
.replace(/\*/g, '\\*')
.replace(/\(/g, '\\(')
.replace(/\)/g, '\\)')
.replace(/\{/g, '\\{')
.replace(/}/g, '\\}'),
visibility: 'PUBLIC',
distribution: {
feedDistribution: 'MAIN_FEED',
Expand Down

0 comments on commit 3e39d46

Please sign in to comment.