Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

small parser bug/ feature request when using multiple loops with { } ? #36

Open
Reiner030 opened this issue Aug 17, 2015 · 3 comments
Open

Comments

@Reiner030
Copy link

Hello,

I got a file with a nice onliner for setting variables from pillar to enhance like:

{%- do environments[environment].update ({ 'jenkins': { 'port': '1' + port['environment'][environment]['port'] + '00' + '6' }}) %}

and the closing loops written as }} are marked red because the parser identifies it as closing saltstack tag which is missing the opening tag instead of 2 independent ending loop marker.

If this is not too complicated it would be nice there could a fix ?

Bests

@basepi
Copy link
Contributor

basepi commented Aug 17, 2015

Hrm, I'm not sure what the fix would look like here, because in general those are closing jinja variable tags. Have you tried putting a space between the two curly braces?

@Reiner030
Copy link
Author

yes... and it works. I suggest the code owner then to put there better spaces between them ^^...
Was only the idea that the parser perhaps could easy handle such situation, too.
If its not easy then feel free to close this thread ;)

@basepi
Copy link
Contributor

basepi commented Aug 17, 2015

I'm going to leave it open for the moment. I don't have any bright ideas but maybe someone else will.

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

No branches or pull requests

2 participants