Skip to content

Commit d13a0e6

Browse files
authored
Do not show No match found for tribute (#16231)
Tribute.js will show an untranslated no match found if no emoji or mentions. Further the mentions should really require a preceding space. This PR fixes both of these. Signed-off-by: Andrew Thornton <art27@cantab.net>
1 parent 5f2ef17 commit d13a0e6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/features/tribute.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function makeCollections({mentions, emoji}) {
3232
if (emoji) {
3333
collections.push({
3434
values: window.config.tributeValues,
35-
noMatchTemplate: () => null,
35+
requireLeadingSpace: true,
3636
menuItemTemplate: (item) => {
3737
return `
3838
<div class="tribute-item">
@@ -69,7 +69,7 @@ export default async function attachTribute(elementOrNodeList, {mentions, emoji}
6969
emoji: emoji || emojiNodes.length > 0,
7070
});
7171

72-
const tribute = new Tribute({collection: collections});
72+
const tribute = new Tribute({collection: collections, noMatchTemplate: ''});
7373
for (const node of uniqueNodes) {
7474
tribute.attach(node);
7575
}

0 commit comments

Comments
 (0)