Skip to content

Commit 6288b63

Browse files
author
Ido Shamun
committed
fix(tweet): handle correctly spaces in hashtags
1 parent 1251c00 commit 6288b63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/tweet.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const buildTweet = (model, tags) => {
2020
const siteHandler = getSiteHandler(model);
2121
const via = siteHandler ? ` via ${siteHandler}` : '';
2222
const by = model.creatorTwitter ? ` by ${model.creatorTwitter}` : '';
23-
const hashtags = tags.map(tag => `#${tag.replace(/-/g, '')}`).join(' ');
23+
const hashtags = tags.map(tag => `#${tag.replace(/-| /g, '')}`).join(' ');
2424
return `${model.title}${via}${by}\n${hashtags}\n\n${link}`;
2525
};
2626

0 commit comments

Comments
 (0)