Merge branch 'main' into feature-sort-by-frequent-use

This commit is contained in:
DominikDoom
2023-11-05 13:30:51 +01:00
2 changed files with 23 additions and 17 deletions

View File

@@ -523,6 +523,10 @@ async function insertTextAtCursor(textArea, result, tagword, tabCompletedWithout
optionalSeparator = TAC_CFG.extraNetworksSeparator || " ";
}
// Escape $ signs since they are special chars for the replace function
// We need four since we're also escaping them in replaceAll in the first place
sanitizedText = sanitizedText.replaceAll("$", "$$$$");
// Replace partial tag word with new text, add comma if needed
let insert = surrounding.replace(match, sanitizedText + optionalSeparator);