From 5f2f03e05479a3b45dd8016c7ed32809546763ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Thu, 24 Sep 2020 10:06:23 -0400 Subject: [PATCH] Wrap symlink content properly for layout --- gitsrht/blueprints/repo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index c4773b8..a5e180d 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -57,9 +57,10 @@ def get_readme(repo, git_repo, tip, link_prefix=None): def _highlight_file(repo, ref, entry, data, blob_id, commit_id): link_prefix = url_for('repo.tree', owner=repo.owner, repo=repo.name, ref=ref) - if entry.filemode == pygit2.GIT_FILEMODE_LINK: - return Markup(f"" + - f"{escape(data)}") + if blob.filemode == pygit2.GIT_FILEMODE_LINK: + return Markup("
" +
+                f"" +
+                f"{escape(data)}
") else: return get_highlighted_file("git.sr.ht:git", entry.name, blob_id, data) -- 2.38.4