Show More
@@ -1254,6 +1254,12 b' def fancy_file_stats(stats):' | |||||
1254 | (?<!\w|[-_]) |
|
1254 | (?<!\w|[-_]) | |
1255 | (?P<hash>[0-9a-f]{12,40}) |
|
1255 | (?P<hash>[0-9a-f]{12,40}) | |
1256 | (?!\w|[-_]) | |
|
1256 | (?!\w|[-_]) | | |
|
1257 | # Markup of *bold text* | |||
|
1258 | (?: | |||
|
1259 | (?:^|(?<=\s)) | |||
|
1260 | (?P<bold> [*] (?!\s) [^*\n]* (?<!\s) [*] ) | |||
|
1261 | (?![*\w]) | |||
|
1262 | ) | | |||
1257 | # "Stylize" markup |
|
1263 | # "Stylize" markup | |
1258 | \[see\ \=>\ *(?P<seen>[a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\] | |
|
1264 | \[see\ \=>\ *(?P<seen>[a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\] | | |
1259 | \[license\ \=>\ *(?P<license>[a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\] | |
|
1265 | \[license\ \=>\ *(?P<license>[a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\] | | |
@@ -1289,6 +1295,9 b' def urlify_text(s, repo_name=None, link_' | |||||
1289 | 'url': url('changeset_home', repo_name=repo_name, revision=hash_), |
|
1295 | 'url': url('changeset_home', repo_name=repo_name, revision=hash_), | |
1290 | 'hash': hash_, |
|
1296 | 'hash': hash_, | |
1291 | } |
|
1297 | } | |
|
1298 | bold = match_obj.group('bold') | |||
|
1299 | if bold is not None: | |||
|
1300 | return '<b>*%s*</b>' % _urlify(bold[1:-1]) | |||
1292 | if stylize: |
|
1301 | if stylize: | |
1293 | seen = match_obj.group('seen') |
|
1302 | seen = match_obj.group('seen') | |
1294 | if seen: |
|
1303 | if seen: |
@@ -352,6 +352,19 b' class TestLibs(TestController):' | |||||
352 | ("deadbeefcafe 123412341234", |
|
352 | ("deadbeefcafe 123412341234", | |
353 | """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="revision-link" href="/repo_name/changeset/123412341234">123412341234</a>""", |
|
353 | """<a class="revision-link" href="/repo_name/changeset/deadbeefcafe">deadbeefcafe</a> <a class="revision-link" href="/repo_name/changeset/123412341234">123412341234</a>""", | |
354 | ""), |
|
354 | ""), | |
|
355 | ("We support * markup for *bold* markup of *single or multiple* words, " | |||
|
356 | "*a bit @like http://slack.com*. " | |||
|
357 | "The first * must come after whitespace and not be followed by whitespace, " | |||
|
358 | "contain anything but * and newline until the next *, " | |||
|
359 | "which must not come after whitespace " | |||
|
360 | "and not be followed by * or alphanumerical *characters*.", | |||
|
361 | """We support * markup for <b>*bold*</b> markup of <b>*single or multiple*</b> words, """ | |||
|
362 | """<b>*a bit <b>@like</b> <a href="http://slack.com">http://slack.com</a>*</b>. """ | |||
|
363 | """The first * must come after whitespace and not be followed by whitespace, """ | |||
|
364 | """contain anything but * and newline until the next *, """ | |||
|
365 | """which must not come after whitespace """ | |||
|
366 | """and not be followed by * or alphanumerical <b>*characters*</b>.""", | |||
|
367 | "-"), | |||
355 | # tags are covered by test_tag_extractor |
|
368 | # tags are covered by test_tag_extractor | |
356 | ]) |
|
369 | ]) | |
357 | def test_urlify_test(self, sample, expected, url_): |
|
370 | def test_urlify_test(self, sample, expected, url_): |
General Comments 0
You need to be logged in to leave comments.
Login now