Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List variable names present in a template #76

Closed
ebogdum opened this issue May 21, 2022 · 1 comment
Closed

List variable names present in a template #76

ebogdum opened this issue May 21, 2022 · 1 comment

Comments

@ebogdum
Copy link

ebogdum commented May 21, 2022

As a user I would like to be able to extract the variable names that are present in the template.
One of the main reasons is that it would make it a lot easier to get those variables in a programatic way.
If you have a DB or file or API that provides the variables, and you have 200 or them in total, but only 4 present in a template, it would make it a lot faster and secure to get only the 4 you need.

For example:

This is a variable called {{ var_name }}, please allow a way of listing it.

File (Template) Variables list:
["var_name"]

@ebogdum
Copy link
Author

ebogdum commented May 21, 2022

Never mind, I just looked at the code and found the ExtractTags function.

@ebogdum ebogdum closed this as completed May 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant