From 73cfc6979fb5bfc745f16d50bcf162264e896a76 Mon Sep 17 00:00:00 2001 From: Zed Date: Fri, 11 Oct 2019 18:43:47 +0200 Subject: [PATCH] Display profile bio in preview --- src/formatters.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/formatters.nim b/src/formatters.nim index f7b2aa5..bc74777 100644 --- a/src/formatters.nim +++ b/src/formatters.nim @@ -54,7 +54,10 @@ proc pageTitle*(profile: Profile): string = &"{profile.fullname} (@{profile.username})" proc pageDesc*(profile: Profile): string = - "The latest tweets from " & profile.fullname + if profile.bio.len > 0: + stripHtml(profile.bio) + else: + "The latest tweets from " & profile.fullname proc getJoinDate*(profile: Profile): string = profile.joinDate.format("'Joined' MMMM YYYY")