diff --git a/lib/ace/ext/language_tools.js b/lib/ace/ext/language_tools.js index 371fcf29d43..4ba2e34c5bf 100644 --- a/lib/ace/ext/language_tools.js +++ b/lib/ace/ext/language_tools.js @@ -50,10 +50,12 @@ var keyWordCompleter = { }; var transformSnippetTooltip = function(str) { - var record = {} + var record = {}; return str.replace(/\${(\d+)(:(.*?))?}/g, function(_, p1, p2, p3) { return (record[p1] = p3 || ''); - }).replace(/\$(\d+?)/g, (_, p1) => record[p1]) + }).replace(/\$(\d+?)/g, function (_, p1) { + return record[p1]; + }) } var snippetCompleter = {