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

Support variable subscirpt syntax #281

Merged
merged 2 commits into from
Jun 23, 2022
Merged

Conversation

hnakamur
Copy link
Contributor

No description provided.

@sonarcloud
Copy link

sonarcloud bot commented Dec 10, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@hnakamur
Copy link
Contributor Author

Sorry, could you wait for a day or two to review this?
Maybe this should be done in Expression.

@hnakamur
Copy link
Contributor Author

I looked at Jinja code parse_unary, parse_postfix, and parse_subscript and found out that Jinja supports dot and brackets subscripts and function calls for expressions as well as identifiers.

However currently pongo2 supports dot subscripts and function calls for only identifiers.
So I think it is reasonable to add support brackets subscripts for only identifiers for now.

@sonarcloud
Copy link

sonarcloud bot commented Jun 23, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.6% 3.6% Duplication

@flosch
Copy link
Owner

flosch commented Jun 23, 2022

Thanks for your contribution.

@flosch flosch merged commit f474720 into flosch:master Jun 23, 2022
@hnakamur hnakamur deleted the variable_subscript branch June 23, 2022 17:59
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

Successfully merging this pull request may close these issues.

None yet

2 participants