mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-06-19 17:45:44 +02:00
Allow variable encoding in snippets
This commit is contained in:
@@ -5,9 +5,11 @@ export class SnippetParser {
|
||||
|
||||
public static getPlaceholders(value: string[] | string, openingTags: string = '[[', closingTags: string = ']]'): string[] {
|
||||
const template = SnippetParser.template(value);
|
||||
console.log(template);
|
||||
console.log(Mustache.parse(template, [openingTags, closingTags]));
|
||||
|
||||
return Mustache.parse(template, [openingTags, closingTags])
|
||||
.filter((v) =>{ return v[0] === 'name' })
|
||||
.filter((v) => v[0] === 'name' || v[0] === '&')
|
||||
.map((v) => { return v[1]; });
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user