title: jinja2 how to remove trailing newline
body: <p>I'm using jinja 2 to output a yaml file but can't seem to get rid of a trailing newline and the end of a for loop. Eg the below </p>
  
  <pre><code> - request:
          path: {{ path }}
          headers:
            origin: 'somedomain.com'
            user-agent: 'agent'
            referer: 'some.domain.com'
            authority: 'somedomain.com'
          querystring:
            {% for key, value in querystring.items() -%}
            {{ key }}: '{{ value }}'
            {% endfor %}
        response:
          content:
            file: {{ content }}
  </code></pre>
  
  <p>gives me the output:</p>
  
  <pre><code>- request:
      path: /some/path
      headers:
        origin: 'somedomain.com'
        user-agent: 'agent'
        referer: 'somedomain.com'
        authority: 'somedomain.com'
      querystring:
        postcode: 'xxxxxx'
        houseNo: '55'
  
    response:
      content:
        file: address.json
  </code></pre>
  
  <p>With an additional unwanted blank line after houseNo.    How do I get rid of this line?</p>