mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -32,7 +32,7 @@ function makeCollections({mentions, emoji}) { | |||||||
|   if (emoji) { |   if (emoji) { | ||||||
|     collections.push({ |     collections.push({ | ||||||
|       values: window.config.tributeValues, |       values: window.config.tributeValues, | ||||||
|       noMatchTemplate: () => null, |       requireLeadingSpace: true, | ||||||
|       menuItemTemplate: (item) => { |       menuItemTemplate: (item) => { | ||||||
|         return ` |         return ` | ||||||
|           <div class="tribute-item"> |           <div class="tribute-item"> | ||||||
| @@ -69,7 +69,7 @@ export default async function attachTribute(elementOrNodeList, {mentions, emoji} | |||||||
|     emoji: emoji || emojiNodes.length > 0, |     emoji: emoji || emojiNodes.length > 0, | ||||||
|   }); |   }); | ||||||
|  |  | ||||||
|   const tribute = new Tribute({collection: collections}); |   const tribute = new Tribute({collection: collections, noMatchTemplate: ''}); | ||||||
|   for (const node of uniqueNodes) { |   for (const node of uniqueNodes) { | ||||||
|     tribute.attach(node); |     tribute.attach(node); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 zeripath
					zeripath