notes: address review

This commit is contained in:
HookedBehemoth 2022-06-29 14:12:44 +02:00
parent c798931186
commit 0e9d7ae299
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ let
userPicRegex = re"_(normal|bigger|mini|200x200|400x400)(\.[A-z]+)$"
extRegex = re"(\.[A-z]+)$"
illegalXmlRegex = re"(*UTF8)[^\x09\x0A\x0D\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]"
hashtagRegex = re"#(\w+)"
mentionRegex = re"@(\w+)"
hashtagRegex = re"\B#(\w*[A-Za-z]\w*)\b"
mentionRegex = re"\B@(\w{1,15})\b"
proc getUrlPrefix*(cfg: Config): string =
if cfg.useHttps: https & cfg.hostname

View File

@ -64,7 +64,7 @@ proc renderNoteParagraph(articleParagraph: ArticleParagraph; article: Article):
result.add link
of ArticleEntityType.media:
for id in entity.mediaIds:
let url: string = article.media[id].getSmallPic
let url = article.media[id].getSmallPic
let image = buildHtml(span(class="image")):
img(src=url, alt="")
result.add image