diff options
| author | Henry Jameson <me@hjkos.com> | 2021-08-15 18:11:38 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-08-15 18:11:38 +0300 |
| commit | 8cc1ad67dff93b5faa1ed1bab663d16748eec68d (patch) | |
| tree | 18ede5287cefe20d4af15b974dd90cfdaaeef578 /src/components | |
| parent | f16658adfc897a3b07ed7f79d872acd2c3837cc8 (diff) | |
fix links sticking to mentionsline
Diffstat (limited to 'src/components')
| -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( |
