Skip to content

Commit

Permalink
fix: replace twitter links to be on the twitter domain
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsathiya committed Jan 4, 2025
1 parent dfa29d9 commit a51508a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/notion-to-md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async function processPage(page: PageObjectResponse) {
link: {
url: textBlock.text.link.url
.replace(new RegExp(searchString, 'g'), replaceString)
.replace(new RegExp('x.com', 'g'), 'twitter.com')
.replace(/\/\d{4}\/\d{2}\/\d{2}\//, '/post/')
.replace(/\/tag\//, '/tags/'),
},
Expand Down

0 comments on commit a51508a

Please sign in to comment.