FitRunnerMojo eats newlines in HTML
-----------------------------------

                 Key: MFIT-13
                 URL: http://jira.codehaus.org/browse/MFIT-13
             Project: Maven 2.x FIT Plugin
          Issue Type: Improvement
    Affects Versions: 2.0-beta-4
            Reporter: Mark Jeffcoat
            Assignee: Mauro Talevi
            Priority: Minor
         Attachments: demo2.html

HTML output comes back all in one line. Normally, this isn't a problem, since 
it would be displayed the same, but I've attached a (real) use case that 
depends on <pre>formatted text. Putting everything on one line in the output 
makes it unreadable. 

The problem is in FitRunnerMojo.read(Reader in). According to BufferedReader's 
javadoc, br.readLine() returns "A String containing the contents of the line, 
not including any line-termination characters".  The fix is to either manually 
put the EOL character back in, e.g., 

+       String eol = System.getProperty("line.separator");
         String line = br.readLine();
         while ( line != null )
         {
-            sb.append( line );
+           sb.append( line +eol );
             line = br.readLine();
         }

or (likely more elegantly), use a reader method that doesn't have this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to