<commit_before>module Helper.ArticleInfo where

import Import
import Data.Time
import Data.Time.Format.Human

articleInfo :: Article -> Widget
articleInfo article = do
  now <- liftIO $ getCurrentTime
  (author, tags) <- handlerToWidget $ runDB $ do
    Entity key Article {articleAuthor, ..} <- getBy404 $ UniqueSlug (articleSlug article)
    author <- get404 articleAuthor
    tags <- map (tagName . entityVal) <$> selectList [TagArticle ==. key] []
    return (author, tags)
  let screenAuthor = userScreenName author
  $(widgetFile "inline/articleInfo")<commit_msg>add Filter condtion that is Asc TagName<commit_after>module Helper.ArticleInfo where

import Import
import Data.Time
import Data.Time.Format.Human

articleInfo :: Article -> Widget
articleInfo article = do
  now <- liftIO $ getCurrentTime
  (author, tags) <- handlerToWidget $ runDB $ do
    Entity key Article {articleAuthor, ..} <- getBy404 $ UniqueSlug (articleSlug article)
    author <- get404 articleAuthor
    tags <- map (tagName . entityVal) <$> selectList [TagArticle ==. key] [Asc TagName]
    return (author, tags)
  let screenAuthor = userScreenName author
  $(widgetFile "inline/articleInfo")
{'fraction_non_alphanumeric': 0.10212765957446808, 'fraction_numerical': 0.010212765957446808, 'mean_word_length': 4.20353982300885, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3702477', 'n_tokens_mistral': 361, 'n_tokens_neox': 334, 'n_words': 107}