Skip to content
Snippets Groups Projects
Commit 2b8c8fc9 authored by Hanabishi Recca's avatar Hanabishi Recca
Browse files

fix: make dependency source use superscript tag


Avoid using special characters and use '<sup>' HTML tag instead.
To not rely on user's fonts Unicode coverage.

Closes: #490
Signed-off-by: default avatarHanabishi <1722-hanabishi@users.noreply.gitlab.archlinux.org>
parent 27c51430
No related branches found
Tags v6.0.27
1 merge request!765fix: make dependency source use superscript tag
Pipeline #80824 passed
......@@ -85,7 +85,7 @@ def package_link(package: Union[Package, OfficialProvider]) -> str:
def provides_markup(provides: Providers) -> str:
links = []
for pkg in provides:
aur = "ᴬᵁᴿ" if not pkg.is_official else ""
aur = "<sup><small>AUR</small></sup>" if not pkg.is_official else ""
links.append(f'<a href="{package_link(pkg)}">{pkg.Name}</a>{aur}')
return ", ".join(links)
......
......@@ -21,7 +21,7 @@
{% else -%}
</a>
{%- if dep.is_aur_package() -%}
ᴬᵁᴿ
<sup><small>AUR</small></sup>
{% endif %}
{% endif %}
......
......@@ -176,9 +176,9 @@ def test_provides_markup(package: Package):
RelTypeID=PROVIDES_ID,
)
# AUR provider links should end with ᴬᵁᴿ
# AUR provider links should end with <sup><small>AUR</small></sup>
link = util.provides_markup(dep.provides())
assert link.endswith("</a>ᴬᵁᴿ")
assert link.endswith("</a><sup><small>AUR</small></sup>")
assert OFFICIAL_BASE not in link
# Remove AUR provider and add official one
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment