Where root-desc and repo.desc are used in the header region, also
emit their html counterparts afterwards if they are defined.

Where root-desc are repo.desc are used outside the header,
eg in the repo list, leave it as it is without adding any
related html.

Signed-off-by: Andy Green <[email protected]>
---
 ui-shared.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ui-shared.c b/ui-shared.c
index c8f4d8f..a9ec430 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -1013,11 +1013,15 @@ static void print_header(void)
        html("<tr><td class='sub'>");
        if (ctx.repo) {
                html_txt(ctx.repo->desc);
+               if (ctx.repo->desc_html)
+                       html(ctx.repo->desc_html);
                html("</td><td class='sub right'>");
                html_txt(ctx.repo->owner);
        } else {
                if (ctx.cfg.root_desc)
                        html_txt(ctx.cfg.root_desc);
+               if (ctx.cfg.root_desc_html)
+                       html(ctx.cfg.root_desc_html);
        }
        html("</td></tr></table>\n");
 }

_______________________________________________
CGit mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/cgit

Reply via email to