Merge branch 'develop' into fix/postform-footer-button-overflow

This commit is contained in:
1Step621 2023-12-31 11:57:46 +09:00 committed by GitHub
commit 968e56ad4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 233 additions and 105 deletions

View file

@ -752,7 +752,17 @@ async function post(ev?: MouseEvent) {
if (withHashtags.value && hashtags.value && hashtags.value.trim() !== '') {
const hashtags_ = hashtags.value.trim().split(' ').map(x => x.startsWith('#') ? x : '#' + x).join(' ');
postData.text = postData.text ? `${postData.text} ${hashtags_}` : hashtags_;
if (!postData.text) {
postData.text = hashtags_;
} else {
const postTextLines = postData.text.split('\n');
if (postTextLines[postTextLines.length - 1].trim() === '') {
postTextLines[postTextLines.length - 1] += hashtags_;
} else {
postTextLines[postTextLines.length - 1] += ' ' + hashtags_;
}
postData.text = postTextLines.join('\n');
}
}
// plugin