always use template strings instead of string concatenation

This commit is contained in:
zadam
2022-12-21 15:19:05 +01:00
parent ea006993f6
commit 1b24276a4a
154 changed files with 433 additions and 437 deletions

View File

@@ -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 = [