fix: extra lines removed
This commit is contained in:
parent
7d7edecafe
commit
ae16e81f8e
3 changed files with 6 additions and 4 deletions
|
@ -44,11 +44,13 @@ async function handleMastodonPost(env) {
|
|||
]
|
||||
})
|
||||
|
||||
const content = truncateContent(title, plainTextDescription, link, maxLength)
|
||||
const cleanedDescription = plainTextDescription.replace(/\s+/g, ' ').trim()
|
||||
const content = truncateContent(title, cleanedDescription, link, maxLength)
|
||||
|
||||
await postToMastodon(mastodonApiUrl, accessToken, content)
|
||||
|
||||
const timestamp = new Date().toISOString()
|
||||
|
||||
await env.RSS_TO_MASTODON_NAMESPACE.put(item.link, timestamp)
|
||||
|
||||
console.log(`Posted stored URL: ${item.link}`)
|
||||
|
|
Reference in a new issue