https://bugzilla.wikimedia.org/show_bug.cgi?id=25725
Summary: Unwanted linebreaks in diffs when span.diffchange is
present
Product: MediaWiki
Version: 1.16
Platform: All
URL: http://en.wikipedia.org/w/index.php?title=User:Edokter
/vector.css&diff=prev&oldid=393815275
OS/Version: All
Status: NEW
Severity: minor
Priority: Normal
Component: History/Diffs
AssignedTo: [email protected]
ReportedBy: [email protected]
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>
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l