mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	always use template strings instead of string concatenation
This commit is contained in:
		| @@ -17,9 +17,9 @@ async function autocompleteSourceForCKEditor(queryText) { | ||||
|                 return { | ||||
|                     action: row.action, | ||||
|                     noteTitle: row.noteTitle, | ||||
|                     id: '@' + row.notePathTitle, | ||||
|                     id: `@${row.notePathTitle}`, | ||||
|                     name: row.notePathTitle, | ||||
|                     link: '#' + row.notePath, | ||||
|                     link: `#${row.notePath}`, | ||||
|                     notePath: row.notePath, | ||||
|                     highlightedNotePathTitle: row.highlightedNotePathTitle | ||||
|                 } | ||||
| @@ -33,9 +33,7 @@ async function autocompleteSourceForCKEditor(queryText) { | ||||
| async function autocompleteSource(term, cb, options = {}) { | ||||
|     const activeNoteId = appContext.tabManager.getActiveContextNoteId(); | ||||
|  | ||||
|     let results = await server.get('autocomplete' | ||||
|             + '?query=' + encodeURIComponent(term) | ||||
|             + '&activeNoteId=' + activeNoteId); | ||||
|     let results = await server.get(`autocomplete?query=${encodeURIComponent(term)}&activeNoteId=${activeNoteId}`); | ||||
|  | ||||
|     if (term.trim().length >= 1 && options.allowCreatingNotes) { | ||||
|         results = [ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user