I care because I shouldn't be getting the new line if I'm using the closing -%> correct? And in any other type of file I do this very same syntax I don't get empty lines. So why is it happening here?
On Tuesday, April 14, 2015 at 3:10:58 PM UTC-4, Neil - Puppet List wrote: > > Hello > > You have 3 newlines there which I've marked with Xs I expect you to get > N+2. > > But why do you care? Out of "I wonder why that is happening?" Is fine. > Beyond that the XML is for a machine not you to spend your time reading. I > hope :) > > Neil > On 14 Apr 2015 16:20, "Mark Rosedale" <[email protected] <javascript:>> > wrote: > > > > So I have an erb template. x.xml.erb > > > > Inside the file I iterate over an array to add some contents to the > file. It looks like so. > > > > <?xml version="1.0" encoding="utf-8"?> > > <VCConfiguration>X > > <%- @x_custom.each do |value| -%> > > <%= value %>X > > <%- end -%>X > > <MoreCode><%= key %></MoreCode> > > > > However, I'm having an issue when puppet actually updates that file. If > I have an array with one value in it I'd expect 1 line to be printed > instead 3 lines get printed out. So the file might look like this > > > > <?xml version="1.0" encoding="utf-8"?> > > <VCConfiguration> > > > > > > <SomeTextFromPuppet>text</SomeTextFromPuppet> > > > > > > <MoreCode>somekey</MoreCode> > > > > I've iterated over arrays in other templates in my puppet code without > any issue of added lines, but for some reason xml files seem to be giving > me trouble. Anyone else experience this, or have an idea what might be > going on here? > > > > -- > > 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 [email protected] <javascript:>. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/88385a17-729e-47b6-8ac7-6d6ce5d3a0bd%40googlegroups.com > . > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/d488743f-89d0-464d-8ead-a1330a9cf1d4%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
