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

Object property access is not parsed correctly #148

Closed
wyozi opened this issue Aug 5, 2019 · 1 comment · Fixed by #151
Closed

Object property access is not parsed correctly #148

wyozi opened this issue Aug 5, 2019 · 1 comment · Fixed by #151

Comments

@wyozi
Copy link
Contributor

wyozi commented Aug 5, 2019

When trying to access object's property with a name containing special character, the parsing fails. See for example

const raw = {{ yarr["foo:zoo"] }};
const params = {yarr: {"foo:zoo": "Bar"}};
engine
	.parseAndRender(raw, params)
	.then(console.log)

AST is something like

Output {
        token:
         OutputToken {
           trimLeft: false,
           trimRight: false,
           type: 'output',
           col: 1,
           line: 1,
           raw: '{{ yarr["foo:zoo"] }}',
           value: 'yarr["foo:zoo"]',
           input: '{{ yarr["foo:zoo"] }}',
           file: undefined },
        value:
         Value { filters: [], strictFilters: false, initial: 'yarr["foo' } }

The initial was not parsed properly. This used to work in liquidjs 6.x.x

@harttle
Copy link
Owner

harttle commented Aug 9, 2019

🎉 This issue has been resolved in version 8.5.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants