Show More
@@ -933,7 +933,7 b' tags_paterns = OrderedDict((' | |||||
933 | '<div class="metatag" tag="lang">\\2</div>')), |
|
933 | '<div class="metatag" tag="lang">\\2</div>')), | |
934 |
|
934 | |||
935 | ('see', (re.compile(r'\[see\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]'), |
|
935 | ('see', (re.compile(r'\[see\ \=\>\ *([a-zA-Z0-9\/\=\?\&\ \:\/\.\-]*)\]'), | |
936 |
'<div class="metatag" tag="see">see |
|
936 | '<div class="metatag" tag="see">see: \\1 </div>')), | |
937 |
|
937 | |||
938 | ('url', (re.compile(r'\[url\ \=\>\ \[([a-zA-Z0-9\ \.\-\_]+)\]\((.*?)\)\]'), |
|
938 | ('url', (re.compile(r'\[url\ \=\>\ \[([a-zA-Z0-9\ \.\-\_]+)\]\((.*?)\)\]'), | |
939 | '<div class="metatag" tag="url"> <a href="\\2">\\1</a> </div>')), |
|
939 | '<div class="metatag" tag="url"> <a href="\\2">\\1</a> </div>')), | |
@@ -942,9 +942,9 b' tags_paterns = OrderedDict((' | |||||
942 | '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/\\1">\\1</a></div>')), |
|
942 | '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/\\1">\\1</a></div>')), | |
943 |
|
943 | |||
944 | ('ref', (re.compile(r'\[(requires|recommends|conflicts|base)\ \=\>\ *([a-zA-Z0-9\-\/]*)\]'), |
|
944 | ('ref', (re.compile(r'\[(requires|recommends|conflicts|base)\ \=\>\ *([a-zA-Z0-9\-\/]*)\]'), | |
945 |
'<div class="metatag" tag="ref \\1">\\1 |
|
945 | '<div class="metatag" tag="ref \\1">\\1: <a href="/\\2">\\2</a></div>')), | |
946 |
|
946 | |||
947 | ('state', (re.compile(r'\[(stable|featured|stale|dead|dev)\]'), |
|
947 | ('state', (re.compile(r'\[(stable|featured|stale|dead|dev|deprecated)\]'), | |
948 | '<div class="metatag" tag="state \\1">\\1</div>')), |
|
948 | '<div class="metatag" tag="state \\1">\\1</div>')), | |
949 |
|
949 | |||
950 | # label in grey |
|
950 | # label in grey |
@@ -84,6 +84,7 b'' | |||||
84 | [tag="ref requires"] { &:extend(.tag3); } |
|
84 | [tag="ref requires"] { &:extend(.tag3); } | |
85 |
|
85 | |||
86 | [tag="state dead"] { &:extend(.tag4); } |
|
86 | [tag="state dead"] { &:extend(.tag4); } | |
|
87 | [tag="state deprecated"] { &:extend(.tag4); } | |||
87 |
|
88 | |||
88 | [tag="ref conflicts"] { &:extend(.tag4); } |
|
89 | [tag="ref conflicts"] { &:extend(.tag4); } | |
89 |
|
90 |
@@ -12,6 +12,7 b'' | |||||
12 | ('state','[featured]'), |
|
12 | ('state','[featured]'), | |
13 | ('state','[dev]'), |
|
13 | ('state','[dev]'), | |
14 | ('state','[dead]'), |
|
14 | ('state','[dead]'), | |
|
15 | ('state','[deprecated]'), | |||
15 |
|
16 | |||
16 | ('label','[personal]'), |
|
17 | ('label','[personal]'), | |
17 | ('generic','[v2.0.0]'), |
|
18 | ('generic','[v2.0.0]'), |
@@ -279,12 +279,12 b' def test_metatag_extraction(sample, expe' | |||||
279 | (('license', '[license => MIT]'), '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/MIT">MIT</a></div>'), |
|
279 | (('license', '[license => MIT]'), '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/MIT">MIT</a></div>'), | |
280 | (('license', '[license => AGPLv3]'), '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/AGPLv3">AGPLv3</a></div>'), |
|
280 | (('license', '[license => AGPLv3]'), '<div class="metatag" tag="license"><a href="http:\/\/www.opensource.org/licenses/AGPLv3">AGPLv3</a></div>'), | |
281 |
|
281 | |||
282 |
(('ref', '[requires => RepoName]'), '<div class="metatag" tag="ref requires">requires |
|
282 | (('ref', '[requires => RepoName]'), '<div class="metatag" tag="ref requires">requires: <a href="/RepoName">RepoName</a></div>'), | |
283 |
(('ref', '[recommends => GroupName]'), '<div class="metatag" tag="ref recommends">recommends |
|
283 | (('ref', '[recommends => GroupName]'), '<div class="metatag" tag="ref recommends">recommends: <a href="/GroupName">GroupName</a></div>'), | |
284 |
(('ref', '[conflicts => SomeName]'), '<div class="metatag" tag="ref conflicts">conflicts |
|
284 | (('ref', '[conflicts => SomeName]'), '<div class="metatag" tag="ref conflicts">conflicts: <a href="/SomeName">SomeName</a></div>'), | |
285 |
(('ref', '[base => SomeName]'), '<div class="metatag" tag="ref base">base |
|
285 | (('ref', '[base => SomeName]'), '<div class="metatag" tag="ref base">base: <a href="/SomeName">SomeName</a></div>'), | |
286 |
|
286 | |||
287 |
(('see', '[see => http://rhodecode.com]'), '<div class="metatag" tag="see">see |
|
287 | (('see', '[see => http://rhodecode.com]'), '<div class="metatag" tag="see">see: http://rhodecode.com </div>'), | |
288 |
|
288 | |||
289 | (('url', '[url => [linkName](https://rhodecode.com)]'), '<div class="metatag" tag="url"> <a href="https://rhodecode.com">linkName</a> </div>'), |
|
289 | (('url', '[url => [linkName](https://rhodecode.com)]'), '<div class="metatag" tag="url"> <a href="https://rhodecode.com">linkName</a> </div>'), | |
290 | (('url', '[url => [example link](https://rhodecode.com)]'), '<div class="metatag" tag="url"> <a href="https://rhodecode.com">example link</a> </div>'), |
|
290 | (('url', '[url => [example link](https://rhodecode.com)]'), '<div class="metatag" tag="url"> <a href="https://rhodecode.com">example link</a> </div>'), |
General Comments 0
You need to be logged in to leave comments.
Login now