r107875 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107874‎ | r107875 | r107876 >
Date:10:55, 3 January 2012
Author:catrope
Status:ok
Tags:
Comment:
(bug 25697) Add   to empty context lines. Based on a patch by Erwin Dokter. Patch modified to change   to   and update the tests
Modified paths:
  • /trunk/extensions/wikidiff2/README (modified) (history)
  • /trunk/extensions/wikidiff2/debian/changelog (modified) (history)
  • /trunk/extensions/wikidiff2/tests/001.phpt (modified) (history)
  • /trunk/extensions/wikidiff2/tests/002.phpt (modified) (history)
  • /trunk/extensions/wikidiff2/wikidiff2.cpp (modified) (history)

Diff [purge]

Index: trunk/extensions/wikidiff2/wikidiff2.cpp
@@ -74,12 +74,12 @@
7575 // Print context
7676 result +=
7777 "<tr>\n"
78 - " <td class=\"diff-marker\"> </td>\n"
 78+ " <td class=\"diff-marker\">&#160;</td>\n"
7979 " <td class=\"diff-context\">";
8080 printTextWithDiv(*linediff[i].from[j]);
8181 result +=
8282 "</td>\n"
83 - " <td class=\"diff-marker\"> </td>\n"
 83+ " <td class=\"diff-marker\">&#160;</td>\n"
8484 " <td class=\"diff-context\">";
8585 printTextWithDiv(*linediff[i].from[j]);
8686 result += "</td>\n</tr>\n";
Index: trunk/extensions/wikidiff2/debian/changelog
@@ -1,3 +1,8 @@
 2+php5-wikidiff2 (1.1.2-1) lucid; urgency=low
 3+ * Fixed bug 25697 (empty context lines not showing)
 4+
 5+ -- Roan Kattouw <rkattouw@wikimedia.org> Tue, 03 Jan 2012 11:54:25 +0100
 6+
27 php5-wikidiff2 (1.1.1-1) lucid; urgency=low
38
49 * Fixed bug 33331 (word breaking around punctuation)
Index: trunk/extensions/wikidiff2/tests/001.phpt
@@ -125,15 +125,15 @@
126126 <td colspan="2" class="diff-lineno"><!--LINE 1--></td>
127127 </tr>
128128 <tr>
129 - <td class="diff-marker"> </td>
 129+ <td class="diff-marker">&#160;</td>
130130 <td class="diff-context"><div>== Added line ==</div></td>
131 - <td class="diff-marker"> </td>
 131+ <td class="diff-marker">&#160;</td>
132132 <td class="diff-context"><div>== Added line ==</div></td>
133133 </tr>
134134 <tr>
135 - <td class="diff-marker"> </td>
 135+ <td class="diff-marker">&#160;</td>
136136 <td class="diff-context"></td>
137 - <td class="diff-marker"> </td>
 137+ <td class="diff-marker">&#160;</td>
138138 <td class="diff-context"></td>
139139 </tr>
140140 <tr>
@@ -142,15 +142,15 @@
143143 <td class="diff-addedline"><div>sjgfkdjfgb</div></td>
144144 </tr>
145145 <tr>
146 - <td class="diff-marker"> </td>
 146+ <td class="diff-marker">&#160;</td>
147147 <td class="diff-context"><div>== Removed line ==</div></td>
148 - <td class="diff-marker"> </td>
 148+ <td class="diff-marker">&#160;</td>
149149 <td class="diff-context"><div>== Removed line ==</div></td>
150150 </tr>
151151 <tr>
152 - <td class="diff-marker"> </td>
 152+ <td class="diff-marker">&#160;</td>
153153 <td class="diff-context"></td>
154 - <td class="diff-marker"> </td>
 154+ <td class="diff-marker">&#160;</td>
155155 <td class="diff-context"></td>
156156 </tr>
157157 <tr>
@@ -159,15 +159,15 @@
160160 <td colspan="2">&nbsp;</td>
161161 </tr>
162162 <tr>
163 - <td class="diff-marker"> </td>
 163+ <td class="diff-marker">&#160;</td>
164164 <td class="diff-context"><div>== Moved text ==</div></td>
165 - <td class="diff-marker"> </td>
 165+ <td class="diff-marker">&#160;</td>
166166 <td class="diff-context"><div>== Moved text ==</div></td>
167167 </tr>
168168 <tr>
169 - <td class="diff-marker"> </td>
 169+ <td class="diff-marker">&#160;</td>
170170 <td class="diff-context"><div>a</div></td>
171 - <td class="diff-marker"> </td>
 171+ <td class="diff-marker">&#160;</td>
172172 <td class="diff-context"><div>a</div></td>
173173 </tr>
174174 <tr>
@@ -176,15 +176,15 @@
177177 <td colspan="2">&nbsp;</td>
178178 </tr>
179179 <tr>
180 - <td class="diff-marker"> </td>
 180+ <td class="diff-marker">&#160;</td>
181181 <td class="diff-context"><div>a</div></td>
182 - <td class="diff-marker"> </td>
 182+ <td class="diff-marker">&#160;</td>
183183 <td class="diff-context"><div>a</div></td>
184184 </tr>
185185 <tr>
186 - <td class="diff-marker"> </td>
 186+ <td class="diff-marker">&#160;</td>
187187 <td class="diff-context"><div>a</div></td>
188 - <td class="diff-marker"> </td>
 188+ <td class="diff-marker">&#160;</td>
189189 <td class="diff-context"><div>a</div></td>
190190 </tr>
191191 <tr>
@@ -192,15 +192,15 @@
193193 <td colspan="2" class="diff-lineno"><!--LINE 12--></td>
194194 </tr>
195195 <tr>
196 - <td class="diff-marker"> </td>
 196+ <td class="diff-marker">&#160;</td>
197197 <td class="diff-context"><div>a</div></td>
198 - <td class="diff-marker"> </td>
 198+ <td class="diff-marker">&#160;</td>
199199 <td class="diff-context"><div>a</div></td>
200200 </tr>
201201 <tr>
202 - <td class="diff-marker"> </td>
 202+ <td class="diff-marker">&#160;</td>
203203 <td class="diff-context"><div>a</div></td>
204 - <td class="diff-marker"> </td>
 204+ <td class="diff-marker">&#160;</td>
205205 <td class="diff-context"><div>a</div></td>
206206 </tr>
207207 <tr>
@@ -209,15 +209,15 @@
210210 <td class="diff-addedline"><div>---line---</div></td>
211211 </tr>
212212 <tr>
213 - <td class="diff-marker"> </td>
 213+ <td class="diff-marker">&#160;</td>
214214 <td class="diff-context"><div>a</div></td>
215 - <td class="diff-marker"> </td>
 215+ <td class="diff-marker">&#160;</td>
216216 <td class="diff-context"><div>a</div></td>
217217 </tr>
218218 <tr>
219 - <td class="diff-marker"> </td>
 219+ <td class="diff-marker">&#160;</td>
220220 <td class="diff-context"><div>a</div></td>
221 - <td class="diff-marker"> </td>
 221+ <td class="diff-marker">&#160;</td>
222222 <td class="diff-context"><div>a</div></td>
223223 </tr>
224224 <tr>
@@ -225,15 +225,15 @@
226226 <td colspan="2" class="diff-lineno"><!--LINE 19--></td>
227227 </tr>
228228 <tr>
229 - <td class="diff-marker"> </td>
 229+ <td class="diff-marker">&#160;</td>
230230 <td class="diff-context"><div>a</div></td>
231 - <td class="diff-marker"> </td>
 231+ <td class="diff-marker">&#160;</td>
232232 <td class="diff-context"><div>a</div></td>
233233 </tr>
234234 <tr>
235 - <td class="diff-marker"> </td>
 235+ <td class="diff-marker">&#160;</td>
236236 <td class="diff-context"><div>a</div></td>
237 - <td class="diff-marker"> </td>
 237+ <td class="diff-marker">&#160;</td>
238238 <td class="diff-context"><div>a</div></td>
239239 </tr>
240240 <tr>
@@ -247,15 +247,15 @@
248248 <td colspan="2">&nbsp;</td>
249249 </tr>
250250 <tr>
251 - <td class="diff-marker"> </td>
 251+ <td class="diff-marker">&#160;</td>
252252 <td class="diff-context"><div>a</div></td>
253 - <td class="diff-marker"> </td>
 253+ <td class="diff-marker">&#160;</td>
254254 <td class="diff-context"><div>a</div></td>
255255 </tr>
256256 <tr>
257 - <td class="diff-marker"> </td>
 257+ <td class="diff-marker">&#160;</td>
258258 <td class="diff-context"><div>a</div></td>
259 - <td class="diff-marker"> </td>
 259+ <td class="diff-marker">&#160;</td>
260260 <td class="diff-context"><div>a</div></td>
261261 </tr>
262262 <tr>
@@ -263,15 +263,15 @@
264264 <td colspan="2" class="diff-lineno"><!--LINE 27--></td>
265265 </tr>
266266 <tr>
267 - <td class="diff-marker"> </td>
 267+ <td class="diff-marker">&#160;</td>
268268 <td class="diff-context"><div>a</div></td>
269 - <td class="diff-marker"> </td>
 269+ <td class="diff-marker">&#160;</td>
270270 <td class="diff-context"><div>a</div></td>
271271 </tr>
272272 <tr>
273 - <td class="diff-marker"> </td>
 273+ <td class="diff-marker">&#160;</td>
274274 <td class="diff-context"><div>a</div></td>
275 - <td class="diff-marker"> </td>
 275+ <td class="diff-marker">&#160;</td>
276276 <td class="diff-context"><div>a</div></td>
277277 </tr>
278278 <tr>
@@ -285,15 +285,15 @@
286286 <td class="diff-addedline"><div>--line2--</div></td>
287287 </tr>
288288 <tr>
289 - <td class="diff-marker"> </td>
 289+ <td class="diff-marker">&#160;</td>
290290 <td class="diff-context"><div>a</div></td>
291 - <td class="diff-marker"> </td>
 291+ <td class="diff-marker">&#160;</td>
292292 <td class="diff-context"><div>a</div></td>
293293 </tr>
294294 <tr>
295 - <td class="diff-marker"> </td>
 295+ <td class="diff-marker">&#160;</td>
296296 <td class="diff-context"><div>a</div></td>
297 - <td class="diff-marker"> </td>
 297+ <td class="diff-marker">&#160;</td>
298298 <td class="diff-context"><div>a</div></td>
299299 </tr>
300300 <tr>
@@ -301,15 +301,15 @@
302302 <td colspan="2" class="diff-lineno"><!--LINE 35--></td>
303303 </tr>
304304 <tr>
305 - <td class="diff-marker"> </td>
 305+ <td class="diff-marker">&#160;</td>
306306 <td class="diff-context"><div>a</div></td>
307 - <td class="diff-marker"> </td>
 307+ <td class="diff-marker">&#160;</td>
308308 <td class="diff-context"><div>a</div></td>
309309 </tr>
310310 <tr>
311 - <td class="diff-marker"> </td>
 311+ <td class="diff-marker">&#160;</td>
312312 <td class="diff-context"><div>== Shortest sequence in Y ==</div></td>
313 - <td class="diff-marker"> </td>
 313+ <td class="diff-marker">&#160;</td>
314314 <td class="diff-context"><div>== Shortest sequence in Y ==</div></td>
315315 </tr>
316316 <tr>
@@ -318,27 +318,27 @@
319319 <td colspan="2">&nbsp;</td>
320320 </tr>
321321 <tr>
322 - <td class="diff-marker"> </td>
 322+ <td class="diff-marker">&#160;</td>
323323 <td class="diff-context"><div>x2</div></td>
324 - <td class="diff-marker"> </td>
 324+ <td class="diff-marker">&#160;</td>
325325 <td class="diff-context"><div>x2</div></td>
326326 </tr>
327327 <tr>
328 - <td class="diff-marker"> </td>
 328+ <td class="diff-marker">&#160;</td>
329329 <td class="diff-context"><div>x1</div></td>
330 - <td class="diff-marker"> </td>
 330+ <td class="diff-marker">&#160;</td>
331331 <td class="diff-context"><div>x1</div></td>
332332 </tr>
333333 <tr>
334 - <td class="diff-marker"> </td>
 334+ <td class="diff-marker">&#160;</td>
335335 <td class="diff-context"><div>x2</div></td>
336 - <td class="diff-marker"> </td>
 336+ <td class="diff-marker">&#160;</td>
337337 <td class="diff-context"><div>x2</div></td>
338338 </tr>
339339 <tr>
340 - <td class="diff-marker"> </td>
 340+ <td class="diff-marker">&#160;</td>
341341 <td class="diff-context"><div>x1</div></td>
342 - <td class="diff-marker"> </td>
 342+ <td class="diff-marker">&#160;</td>
343343 <td class="diff-context"><div>x1</div></td>
344344 </tr>
345345 <tr>
@@ -357,15 +357,15 @@
358358 <td colspan="2">&nbsp;</td>
359359 </tr>
360360 <tr>
361 - <td class="diff-marker"> </td>
 361+ <td class="diff-marker">&#160;</td>
362362 <td class="diff-context"><div>context</div></td>
363 - <td class="diff-marker"> </td>
 363+ <td class="diff-marker">&#160;</td>
364364 <td class="diff-context"><div>context</div></td>
365365 </tr>
366366 <tr>
367 - <td class="diff-marker"> </td>
 367+ <td class="diff-marker">&#160;</td>
368368 <td class="diff-context"><div>context</div></td>
369 - <td class="diff-marker"> </td>
 369+ <td class="diff-marker">&#160;</td>
370370 <td class="diff-context"><div>context</div></td>
371371 </tr>
372372 <tr>
@@ -373,15 +373,15 @@
374374 <td colspan="2" class="diff-lineno"><!--LINE 45--></td>
375375 </tr>
376376 <tr>
377 - <td class="diff-marker"> </td>
 377+ <td class="diff-marker">&#160;</td>
378378 <td class="diff-context"><div>context</div></td>
379 - <td class="diff-marker"> </td>
 379+ <td class="diff-marker">&#160;</td>
380380 <td class="diff-context"><div>context</div></td>
381381 </tr>
382382 <tr>
383 - <td class="diff-marker"> </td>
 383+ <td class="diff-marker">&#160;</td>
384384 <td class="diff-context"><div>== Changed line ==</div></td>
385 - <td class="diff-marker"> </td>
 385+ <td class="diff-marker">&#160;</td>
386386 <td class="diff-context"><div>== Changed line ==</div></td>
387387 </tr>
388388 <tr>
@@ -391,9 +391,9 @@
392392 <td class="diff-addedline"><div>blah blah blah <span class="diffchange diffchange-inline">2</span></div></td>
393393 </tr>
394394 <tr>
395 - <td class="diff-marker"> </td>
 395+ <td class="diff-marker">&#160;</td>
396396 <td class="diff-context"></td>
397 - <td class="diff-marker"> </td>
 397+ <td class="diff-marker">&#160;</td>
398398 <td class="diff-context"></td>
399399 </tr>
400400
Index: trunk/extensions/wikidiff2/tests/002.phpt
@@ -51,9 +51,9 @@
5252 <td colspan="2" class="diff-lineno"><!--LINE 1--></td>
5353 </tr>
5454 <tr>
55 - <td class="diff-marker"> </td>
 55+ <td class="diff-marker">&#160;</td>
5656 <td class="diff-context"><div>== Shortest sequence in X ==</div></td>
57 - <td class="diff-marker"> </td>
 57+ <td class="diff-marker">&#160;</td>
5858 <td class="diff-context"><div>== Shortest sequence in X ==</div></td>
5959 </tr>
6060 <tr>
@@ -62,27 +62,27 @@
6363 <td class="diff-addedline"><div>x1</div></td>
6464 </tr>
6565 <tr>
66 - <td class="diff-marker"> </td>
 66+ <td class="diff-marker">&#160;</td>
6767 <td class="diff-context"><div>x2</div></td>
68 - <td class="diff-marker"> </td>
 68+ <td class="diff-marker">&#160;</td>
6969 <td class="diff-context"><div>x2</div></td>
7070 </tr>
7171 <tr>
72 - <td class="diff-marker"> </td>
 72+ <td class="diff-marker">&#160;</td>
7373 <td class="diff-context"><div>x1</div></td>
74 - <td class="diff-marker"> </td>
 74+ <td class="diff-marker">&#160;</td>
7575 <td class="diff-context"><div>x1</div></td>
7676 </tr>
7777 <tr>
78 - <td class="diff-marker"> </td>
 78+ <td class="diff-marker">&#160;</td>
7979 <td class="diff-context"><div>x2</div></td>
80 - <td class="diff-marker"> </td>
 80+ <td class="diff-marker">&#160;</td>
8181 <td class="diff-context"><div>x2</div></td>
8282 </tr>
8383 <tr>
84 - <td class="diff-marker"> </td>
 84+ <td class="diff-marker">&#160;</td>
8585 <td class="diff-context"><div>x1</div></td>
86 - <td class="diff-marker"> </td>
 86+ <td class="diff-marker">&#160;</td>
8787 <td class="diff-context"><div>x1</div></td>
8888 </tr>
8989 <tr>
@@ -101,14 +101,14 @@
102102 <td class="diff-addedline"><div>x2</div></td>
103103 </tr>
104104 <tr>
105 - <td class="diff-marker"> </td>
 105+ <td class="diff-marker">&#160;</td>
106106 <td class="diff-context"><div>context</div></td>
107 - <td class="diff-marker"> </td>
 107+ <td class="diff-marker">&#160;</td>
108108 <td class="diff-context"><div>context</div></td>
109109 </tr>
110110 <tr>
111 - <td class="diff-marker"> </td>
 111+ <td class="diff-marker">&#160;</td>
112112 <td class="diff-context"><div>context</div></td>
113 - <td class="diff-marker"> </td>
 113+ <td class="diff-marker">&#160;</td>
114114 <td class="diff-context"><div>context</div></td>
115115 </tr>
Index: trunk/extensions/wikidiff2/README
@@ -22,6 +22,9 @@
2323
2424 == Changelog ==
2525
 26+2012-01-03
 27+* (bug 25697) Add &#160; to empty context lines
 28+
2629 2010-09-30
2730 * Automaticly use CXXFLAGS=-Wno-write-strings
2831

Sign-offs

UserFlagDate
Nikerabbitinspected20:08, 3 January 2012

Follow-up revisions

RevisionCommit summaryAuthorDate
r109575* Fixed dpkg-source warning from r107875 due to single space instead of doubl...tstarling22:24, 19 January 2012

Status & tagging log