title: velocity template engine 1.7 line break issue
body: <p>I have a velocity template that generates a Java class and, it's gobbled with new line breaks and this doesn't happen always.</p>
  
  <p>My template looks like this,</p>
  
  <pre><code>#foreach( $str in $elm.mylist )
  #if($selected == $str.how)
  #if($str.how == "value")
      //some comment
  #end
  #if($str.how == "value")
      //some comment
  #end
  #if($str.how == "value")
  #if($foreach.index == 0 || $foreach.index == 1)
      @CustomAnnotation(value = "$!str.value")
  #else
      //@CustomAnnotation(value = "$!str.value")
  #end
  #else
      @CustomAnnotation(value = "$!str.value")
  #end
  #end
  #end
  </code></pre>
  
  <p>generated java file looks like this,</p>
  
  <pre><code>//some comment
  //@CustomAnnotation(value = "sample value
  ")
  //@CustomAnnotation(value = "no value found")
  //@CustomAnnotation(value = "change this")
  @CustomAnnotation(value = "no value found")
  public MyClass varibleName;
  
  //some comment
  //@CustomAnnotation(value = "sample value
  ")
  //@CustomAnnotation(value = "no value found")
  //@CustomAnnotation(value = "change this")
  @CustomAnnotation(value = "no value found")
  public MyClass varibleName_1;
  </code></pre>
  
  <p>how to avoid this new line break?</p>