Fix regex

Star was mistakenly removed in last commit
This commit is contained in:
Matt Bierner 2021-01-15 14:35:55 -08:00
parent 5f6acfb68e
commit 48b726e39e

View file

@ -97,7 +97,7 @@ export function templateToSnippet(template: string): vscode.SnippetString {
template = template.replace(/\$/g, '\\$');
template = template.replace(/^[ \t]*(?=(\/|[ ]\*))/gm, '');
template = template.replace(/^(\/\*\*\s*\*[ ]*)$/m, (x) => x + `\$0`);
template = template.replace(/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]$/gm, (_param, type, post) => {
template = template.replace(/\* @param([ ]\{\S+\})?\s+(\S+)[ \t]*$/gm, (_param, type, post) => {
let out = '* @param ';
if (type === ' {any}' || type === ' {*}') {
out += `{\$\{${snippetIndex++}:*\}} `;