When adding some CSS to my userskin in order to show indents in diffs (see url for code), it revealed that DifferenceEngine.php (I think) is inserting unwnated linebreaks in the output HTML. While not 'illegal', it does thwart the intended effect. This only happens if the line contains a span.diffchange (the red text); other lines are fine. Below is the HTML output; note that line without a diffchange are one line, but the lines with a diffchange have a linebreak after <div> and before </div>, which breaks pre-wrap behaviour. Screenshot: http://en.wikipedia.org/wiki/File:Diff_with_unwanted_linebreaks.gif
<tr>
<td class="diff-marker"> </td> <td class="diff-context"><div>}</div></td> <td class="diff-marker"> </td> <td class="diff-context"><div>}</div></td>
</tr>
<tr>
<td class="diff-marker"> </td> <td class="diff-context"><div>/* Preserve white-space in diffs */</div></td> <td class="diff-marker"> </td> <td class="diff-context"><div>/* Preserve white-space in diffs */</div></td>
</tr>
<tr>
<td class="diff-marker">-</td> <td class="diff-deletedline"><div> <!--unwanted linebreak-->
table.<span class="diffchange">div </span>td div {<!--unwanted linebreak-->
</div></td> <td class="diff-marker">+</td> <td class="diff-addedline"><div> <!-- unwanted linebreak -->
table.<span class="diffchange">diff </span>td div {<!--unwanted linebreak-->
</div></td>
</tr>
<tr>
<td class="diff-marker"> </td> <td class="diff-context"><div> white-space: pre-wrap;</div></td> <td class="diff-marker"> </td> <td class="diff-context"><div> white-space: pre-wrap;</div></td>
</tr>
<tr>
<td class="diff-marker"> </td> <td class="diff-context"><div>}</div></td> <td class="diff-marker"> </td> <td class="diff-context"><div>}</div></td>
</tr>
Version: unspecified
Severity: minor
URL: http://en.wikipedia.org/w/index.php?title=User:Edokter/vector.css&diff=prev&oldid=393815275