Bug 76542 - code formatter always adds lines within <pre></pre> tags
Summary: code formatter always adds lines within <pre></pre> tags
Status: RESOLVED DUPLICATE of bug 52921
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0.1   Edit
Hardware: All Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-19 02:03 EDT by Justin Corpron CLA
Modified: 2004-10-19 10:43 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Corpron CLA 2004-10-19 02:03:42 EDT
The code formatter's new and very nice comment formatter for 3.0.0 and 3.0.1 has
a problem with formatting <pre></pre> HTML tags when there is more than a single
non-blank line within the tags. Everytime the code formatter is run a single
line is added after <pre> and another new line is added prior to </pre>.
Additionally, a single space of indentation is added to the lines within the
<pre> tags.

Example:
<pre>
This theorem is based on 4 points:
    - a
    - b
    - c
    - d
</pre>

results in the following after 4 formatting runs:
<pre>

 
  
   
       This theorem is based on 4 points:
       - a
       - b
       - c
       - d
    
   
  
 
</pre>

A single non-blank line results in desired behavior, it is when there are
multiple line that this bug occurs. I am currently using 3.0.1, and though I use
my own formatter setup, I have tested this bug on the Java Conventions
formatting with the same result.

Thanks,
    Justin

PS: The 3.0 formatter is a great inprovement over 2.1!! Good work.
Comment 1 Olivier Thomann CLA 2004-10-19 10:40:30 EDT
Move to JDT/Text
Comment 2 Dani Megert CLA 2004-10-19 10:43:39 EDT

*** This bug has been marked as a duplicate of 52921 ***