diff options
| author | Henry Jameson <me@hjkos.com> | 2021-08-15 18:11:57 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-08-15 18:11:57 +0300 |
| commit | 5431d8fe55ac43cee7af371c31fe610b6f9c1a7a (patch) | |
| tree | 796ae6fd766e8981df11a11749792f1611e90b04 /src | |
| parent | 6aa6f6f300d2f9de1e6c70a67b9459ae4c4b5a8f (diff) | |
| parent | 8cc1ad67dff93b5faa1ed1bab663d16748eec68d (diff) | |
Merge branch 'better-still-emoji' into proper-attachments
* better-still-emoji:
fix links sticking to mentionsline
Diffstat (limited to 'src')
| -rw-r--r-- | src/components/mentions_line/mentions_line.scss | 2 | ||||
| -rw-r--r-- | src/components/rich_content/rich_content.jsx | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/components/mentions_line/mentions_line.scss b/src/components/mentions_line/mentions_line.scss index 222940c8..50eb0c27 100644 --- a/src/components/mentions_line/mentions_line.scss +++ b/src/components/mentions_line/mentions_line.scss @@ -4,7 +4,7 @@ color: var(--link); } - .mention-link:not(:last-child) { + .mention-link { margin-right: 0.25em; } } diff --git a/src/components/rich_content/rich_content.jsx b/src/components/rich_content/rich_content.jsx index 1353541f..8ab007e3 100644 --- a/src/components/rich_content/rich_content.jsx +++ b/src/components/rich_content/rich_content.jsx @@ -121,6 +121,13 @@ export default Vue.component('RichContent', { // in MentionsLine return currentMentions !== null ? item.trim() : item } + // We add space with mentionsLine, otherwise non-text elements will + // stick to them. + if (currentMentions !== null) { + // single whitespace trim + item = item[0].match(/\s/) ? item.slice(1) : item + } + currentMentions = null if (item.includes(':')) { item = ['', processTextForEmoji( |
