Skip to content

Commit

Permalink
fix: Modify syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeng-J committed Apr 8, 2022
1 parent e707ae2 commit b78d772
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ace/ext/language_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit b78d772

Please sign in to comment.