Skip to content

Commit 168c9e5

Browse files
authored
Merge pull request #653 from rth-apik/feat/render-maintainers-html-avatars
[IMP] Render all maintainer avatars in same size
2 parents a03a166 + 601da11 commit 168c9e5

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tests/test_repo/README.md.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Available addons
1313
----------------
1414
addon | version | maintainers | summary
1515
--- | --- | --- | ---
16-
[module1](module1/) | 8.0.1.0.0 | [![sbidoul](https://github.com/sbidoul.png?size=30px)](https://github.com/sbidoul) | Module 1 summary
16+
[module1](module1/) | 8.0.1.0.0 | <a href='https://github.com/sbidoul'><img src='https://github.com/sbidoul.png' width='32' height='32' style='border-radius:50%;' alt='sbidoul'/></a> | Module 1 summary
1717

1818

1919
Unported addons

tools/gen_addons_table.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
_logger = logging.getLogger(__name__)
3333

34-
3534
MARKERS = r"(\[//\]: # \(addons\))|(\[//\]: # \(end addons\))"
3635
MANIFESTS = ("__openerp__.py", "__manifest__.py")
3736

@@ -55,9 +54,9 @@ def render_maintainers(manifest):
5554
maintainers = manifest.get("maintainers") or []
5655
return " ".join(
5756
[
58-
"[![{maintainer}]"
59-
"(https://github.com/{maintainer}.png?size=30px)]"
60-
"(https://github.com/{maintainer})".format(maintainer=x)
57+
"<a href='https://github.com/{0}'>"
58+
"<img src='https://github.com/{0}.png' width='32' height='32' style='border-radius:50%;' alt='{0}'/>"
59+
"</a>".format(x)
6160
for x in maintainers
6261
]
6362
)

0 commit comments

Comments
 (0)