On Wed, Nov 18, 2015 at 8:42 AM, <tobias.ko...@gmail.com> wrote: > > Have you tried omitting the '\'? As far as I know, Puppet has no >> requirement that array literals be expressed all on one line, and newlines >> are permitted as part of the optional whitespace between elements. >> > It will work without the "\". I was just wondering why because I haven't > found anything in the official documentation and on several web places for > some reason the "\" solution was propagated. >
It works because Puppet ignores whitespace between tokens entirely. That said you can't insert whitespace in the middle of a token and there's no way to "continue" the token into the next line (i.e. a line continuation marker). For example, this is legal: ``` notice( hello::world ) ``` But this is not: ``` notice( hello:: world ) ``` That is because the line break is in the middle of the name token, making it malformed. Note that string literal tokens may span multiple lines, but the whitespace is made part of the string: ``` notice(' hello world ') ``` i.e. this will print the line breaks as they are part of the string. Hope that helps. > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/1491dc4d-91c2-414e-8db8-6f90c3189921%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/1491dc4d-91c2-414e-8db8-6f90c3189921%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACZQQfMRm8MyMxJdEeKH7b-eejorZ07jtMwE0wk4GRphA0yeew%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.