You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 21, 2019. It is now read-only.
I tried debugging the issue and as far as i could tell the issue is after tokenize when we mark spaces then it takes into account spaces inside interpolation syntax as shown above in certain cases where it shouldn't. Possible fix is altering regex to mark spaces at https://github.com/gokmen/hcl-to-json/blob/master/src/tokenize.coffee#L42
But i am not that well versed with regexes and the impact of any change i make so thought i could have some help.
The text was updated successfully, but these errors were encountered:
Hi @vinaynb I've looked at this, unfortunately there is no easy fix for it. I need to change whole implementation to be able to handle quoted strings in quotes correctly but I don't have time for it for now. Patches are welcome, if you need help for fixing it I would like to help. Feel free to try it out with existing test suite by running npm run test after changing. Or while changing if you want to run tests automatically you can use npm run test:watch If you add your test case to the test file and the expected result you can check it out that one directly. For debugging if you need https://github.com/gokmen/hcl-to-json/blob/master/README.md#development
I have a patch in my mind but i am not too confident that it handles all cases well but nevertheless i'll try it out with the test suite and check. Thank you for the help !
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Consider hcl as below
Converting above file to json gives below result
I tried debugging the issue and as far as i could tell the issue is after tokenize when we mark spaces then it takes into account spaces inside interpolation syntax as shown above in certain cases where it shouldn't. Possible fix is altering regex to mark spaces at https://github.com/gokmen/hcl-to-json/blob/master/src/tokenize.coffee#L42
But i am not that well versed with regexes and the impact of any change i make so thought i could have some help.
The text was updated successfully, but these errors were encountered: