##// END OF EJS Templates
helpers: in urlify_text, use <br> for newlines in pre-formatted text so it can be cut'n'pasted correctly...
Mads Kiilerich -
r6146:4e2e6371 default
parent child Browse files
Show More
@@ -1302,6 +1302,7 b' def urlify_text(s, repo_name=None, link_'
1302 if repo_name is not None:
1302 if repo_name is not None:
1303 s = urlify_issues(s, repo_name, link_)
1303 s = urlify_issues(s, repo_name, link_)
1304 s = MENTIONS_REGEX.sub(_mentions_replace, s)
1304 s = MENTIONS_REGEX.sub(_mentions_replace, s)
1305 s = s.replace('\r\n', '<br/>').replace('\n', '<br/>')
1305 return literal(s)
1306 return literal(s)
1306
1307
1307
1308
@@ -99,11 +99,11 b' class TestFilesController(TestController'
99 revision='8911406ad776fdd3d0b9932a2e89677e57405a48',
99 revision='8911406ad776fdd3d0b9932a2e89677e57405a48',
100 f_path='vcs/nodes.py'))
100 f_path='vcs/nodes.py'))
101
101
102 response.mustcontain("""<div class="commit">Partially implemented <a class="issue-tracker-link" href="https://issues.example.com/vcs_test_hg/issue/16">#16</a>. filecontent/commit message/author/node name are safe_unicode now.
102 response.mustcontain("""<div class="commit">Partially implemented <a class="issue-tracker-link" href="https://issues.example.com/vcs_test_hg/issue/16">#16</a>. filecontent/commit message/author/node name are safe_unicode now.<br/>"""
103 In addition some other __str__ are unicode as well
103 """In addition some other __str__ are unicode as well<br/>"""
104 Added test for unicode
104 """Added test for unicode<br/>"""
105 Improved test to clone into uniq repository.
105 """Improved test to clone into uniq repository.<br/>"""
106 removed extra unicode conversion in diff.</div>
106 """removed extra unicode conversion in diff.</div>
107 """)
107 """)
108
108
109 response.mustcontain("""<option selected="selected" value="8911406ad776fdd3d0b9932a2e89677e57405a48">default at 8911406ad776</option>""")
109 response.mustcontain("""<option selected="selected" value="8911406ad776fdd3d0b9932a2e89677e57405a48">default at 8911406ad776</option>""")
@@ -94,9 +94,7 b' View Comment: http://comment.org'
94 <tr>
94 <tr>
95 <td width="20px"></td>
95 <td width="20px"></td>
96 <td>
96 <td>
97 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.
97 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.<br/><br/> - and here it ends indented.</div></div>
98
99 - and here it ends indented.</div></div>
100 </td>
98 </td>
101 <td width="20px"></td>
99 <td width="20px"></td>
102 </tr>
100 </tr>
@@ -253,9 +251,7 b' View Comment: http://comment.org'
253 <tr>
251 <tr>
254 <td width="20px"></td>
252 <td width="20px"></td>
255 <td>
253 <td>
256 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.
254 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.<br/><br/> - and here it ends indented.</div></div>
257
258 - and here it ends indented.</div></div>
259 </td>
255 </td>
260 <td width="20px"></td>
256 <td width="20px"></td>
261 </tr>
257 </tr>
@@ -430,9 +426,7 b' View Comment: http://comment.org'
430 <tr>
426 <tr>
431 <td width="20px"></td>
427 <td width="20px"></td>
432 <td>
428 <td>
433 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.
429 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.<br/><br/> - and here it ends indented.</div></div>
434
435 - and here it ends indented.</div></div>
436 </td>
430 </td>
437 <td width="20px"></td>
431 <td width="20px"></td>
438 </tr>
432 </tr>
@@ -607,9 +601,7 b' View Comment: http://comment.org'
607 <tr>
601 <tr>
608 <td width="20px"></td>
602 <td width="20px"></td>
609 <td>
603 <td>
610 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.
604 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new comment.<br/><br/> - and here it ends indented.</div></div>
611
612 - and here it ends indented.</div></div>
613 </td>
605 </td>
614 <td width="20px"></td>
606 <td width="20px"></td>
615 </tr>
607 </tr>
@@ -728,8 +720,7 b' Subject: Test Message'
728 <td>
720 <td>
729 <table cellpadding="0" cellspacing="0" border="0" width="100%">
721 <table cellpadding="0" cellspacing="0" border="0" width="100%">
730 <tr>
722 <tr>
731 <td style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the body of the test message
723 <td style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the body of the test message<br/> - nothing interesting here except indentation.</div></td>
732 - nothing interesting here except indentation.</div></td>
733 </tr>
724 </tr>
734 </table>
725 </table>
735 </td>
726 </td>
@@ -986,8 +977,7 b' View Pull Request: http://pr.org/7'
986 <tr><td height="10px"></td></tr>
977 <tr><td height="10px"></td></tr>
987 <tr>
978 <tr>
988 <td>
979 <td>
989 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff
980 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff<br/> - please approve indented!</div></div>
990 - please approve indented!</div></div>
991 </td>
981 </td>
992 </tr>
982 </tr>
993 <tr><td height="15px"></td></tr>
983 <tr><td height="15px"></td></tr>
@@ -1160,8 +1150,7 b' View Pull Request: http://pr.org/7'
1160 <tr><td height="10px"></td></tr>
1150 <tr><td height="10px"></td></tr>
1161 <tr>
1151 <tr>
1162 <td>
1152 <td>
1163 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff
1153 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is awesome because it does stuff<br/> - please approve indented!</div></div>
1164 - please approve indented!</div></div>
1165 </td>
1154 </td>
1166 </tr>
1155 </tr>
1167 <tr><td height="15px"></td></tr>
1156 <tr><td height="15px"></td></tr>
@@ -1317,9 +1306,7 b' View Comment: http://pr.org/comment'
1317 <tr>
1306 <tr>
1318 <td width="20px"></td>
1307 <td width="20px"></td>
1319 <td>
1308 <td>
1320 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
1309 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
1321
1322 - and indented on second line</div></div>
1323 </td>
1310 </td>
1324 <td width="20px"></td>
1311 <td width="20px"></td>
1325 </tr>
1312 </tr>
@@ -1482,9 +1469,7 b' View Comment: http://pr.org/comment'
1482 <tr>
1469 <tr>
1483 <td width="20px"></td>
1470 <td width="20px"></td>
1484 <td>
1471 <td>
1485 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
1472 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
1486
1487 - and indented on second line</div></div>
1488 </td>
1473 </td>
1489 <td width="20px"></td>
1474 <td width="20px"></td>
1490 </tr>
1475 </tr>
@@ -1665,9 +1650,7 b' View Comment: http://pr.org/comment'
1665 <tr>
1650 <tr>
1666 <td width="20px"></td>
1651 <td width="20px"></td>
1667 <td>
1652 <td>
1668 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
1653 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
1669
1670 - and indented on second line</div></div>
1671 </td>
1654 </td>
1672 <td width="20px"></td>
1655 <td width="20px"></td>
1673 </tr>
1656 </tr>
@@ -1848,9 +1831,7 b' View Comment: http://pr.org/comment'
1848 <tr>
1831 <tr>
1849 <td width="20px"></td>
1832 <td width="20px"></td>
1850 <td>
1833 <td>
1851 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
1834 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
1852
1853 - and indented on second line</div></div>
1854 </td>
1835 </td>
1855 <td width="20px"></td>
1836 <td width="20px"></td>
1856 </tr>
1837 </tr>
@@ -2030,9 +2011,7 b' View Comment: http://pr.org/comment'
2030 <tr>
2011 <tr>
2031 <td width="20px"></td>
2012 <td width="20px"></td>
2032 <td>
2013 <td>
2033 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
2014 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
2034
2035 - and indented on second line</div></div>
2036 </td>
2015 </td>
2037 <td width="20px"></td>
2016 <td width="20px"></td>
2038 </tr>
2017 </tr>
@@ -2212,9 +2191,7 b' View Comment: http://pr.org/comment'
2212 <tr>
2191 <tr>
2213 <td width="20px"></td>
2192 <td width="20px"></td>
2214 <td>
2193 <td>
2215 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
2194 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
2216
2217 - and indented on second line</div></div>
2218 </td>
2195 </td>
2219 <td width="20px"></td>
2196 <td width="20px"></td>
2220 </tr>
2197 </tr>
@@ -2400,9 +2377,7 b' View Comment: http://pr.org/comment'
2400 <tr>
2377 <tr>
2401 <td width="20px"></td>
2378 <td width="20px"></td>
2402 <td>
2379 <td>
2403 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
2380 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
2404
2405 - and indented on second line</div></div>
2406 </td>
2381 </td>
2407 <td width="20px"></td>
2382 <td width="20px"></td>
2408 </tr>
2383 </tr>
@@ -2588,9 +2563,7 b' View Comment: http://pr.org/comment'
2588 <tr>
2563 <tr>
2589 <td width="20px"></td>
2564 <td width="20px"></td>
2590 <td>
2565 <td>
2591 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!
2566 <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">Me too!<br/><br/> - and indented on second line</div></div>
2592
2593 - and indented on second line</div></div>
2594 </td>
2567 </td>
2595 <td width="20px"></td>
2568 <td width="20px"></td>
2596 </tr>
2569 </tr>
@@ -308,9 +308,9 b' class TestLibs(TestController):'
308 some text 123123123123
308 some text 123123123123
309 sometimes !
309 sometimes !
310 """,
310 """,
311 """Multi line\n"""
311 """Multi line<br/>"""
312 """ url[123123123123]\n"""
312 """ url[123123123123]<br/>"""
313 """ some text url[123123123123]\n"""
313 """ some text url[123123123123]<br/>"""
314 """ sometimes !"""),
314 """ sometimes !"""),
315 ])
315 ])
316 def test_urlify_changesets(self, sample, expected):
316 def test_urlify_changesets(self, sample, expected):
@@ -342,8 +342,8 b' class TestLibs(TestController):'
342 ("""Multi line
342 ("""Multi line
343 https://foo.bar.example.com
343 https://foo.bar.example.com
344 some text lalala""",
344 some text lalala""",
345 """Multi line\n"""
345 """Multi line<br/>"""
346 """ url[https://foo.bar.example.com]\n"""
346 """ url[https://foo.bar.example.com]<br/>"""
347 """ some text lalala""",
347 """ some text lalala""",
348 "https://foo.bar.example.com"),
348 "https://foo.bar.example.com"),
349 ("@mention @someone",
349 ("@mention @someone",
General Comments 0
You need to be logged in to leave comments. Login now