<commit_before>include ../content
include ./sub-post

mixin post(post)
	if post.type == 'repost'
		+core(post.post, true, post)
	else
		+core(post, false)

mixin core(post, isRepost, repost)
	- var login = (me != null);
	- var isHaveReplies = (post.repliesCount > 0);
	- var isTalk = (post.inReplyToPost !== null && post.inReplyToPost.inReplyToPost !== null);
	article.post(
			class                   = isRepost ? 'repost ' + post.type : post.type
			lang                    = post.user.lang
			itemscope
			itemtype                = 'http://schema.org/BlogPosting'
			data-id                 = post.id
			data-cursor             = isRepost ? repost.cursor : post.cursor
			data-type               = post.type
			data-user-name          = post.user.name
			data-user-screen-name   = post.user.screenName
			data-is-liked          != login ? post.isLiked.toString() : null
			data-is-reposted       != login ? post.isReposted.toString() : null
			data-is-have-replies   != isHaveReplies.toString()
			data-is-talk           != isTalk.toString())
		if isTalk
			i.fa.fa-ellipsis-v.talk-ellipsis
		if isHaveReplies
			i.fa.fa-ellipsis-v.replies-ellipsis
		if post.inReplyToPost
			+subPost(post.inReplyToPost)(class='reply-source')
		if isRepost
			p.repost-info
				a.avatar-anchor(href='/' + repost.user.screenName)
					img.avatar(src=repost.user.avatarThumbnailUrl, alt='avatar')
				i.fa.fa-retweet
				span.reposted-by Reposted by 
				a.name(href='/' + repost.user.screenName)= repost.user.name
		div.main
			div.avatar-area
				a.avatar-anchor(href='/' + post.user.screenName)
					img.avatar(src=post.user.avatarThumbnailUrl, alt='avatar')
			header
				div.author(itemprop='author')
					if userSettings.displayUserNameInPost
						a.name(href='/' + post.user.screenName)= post.user.name
						if post.user.isVerified
							img.verified-icon(src= config.resourcesUrl + '/common/verified.png', alt='verified', title='認証済み')
					if userSettings.displayUserScreenNameInPost
						p.screen-name= post.user.screenName
				if userSettings.displayCreatedAtInPost
					a.time-anchor(href='/' + post.user.screenName + '/' + post.id, itemprop='url')
						time(datetime=post.createdAt, itemprop='dateCreated', pubdate, data-display-type='relative')= post.createdAt
			div.content(itemprop='articleBody')
				+content(post)
		footer
			div.like
				button(title= post.isLiked ? 'Unlike' : 'Like')
					if userSettings.enableSushi
						i.fa
							| 🍣
					else
						i.fa.fa-star
				p.count
					= post.likesCount != 0 ? post.likesCount : ''
			div.repost
				button(title= post.isReposted ? 'シェアを取り消し' : 'シェア')
					i.fa.fa-retweet
				p.count
					= post.repostsCount != 0 ? post.repostsCount : ''
			div.reply
				button(title='返信')
					i.fa.fa-reply
				p.count
					= post.repliesCount != 0 ? post.repliesCount : ''<commit_msg>Fix bug<commit_after>include ../content
include ./sub-post

mixin post(post)
	if post.type == 'repost'
		+core(post.post, true, post)
	else
		+core(post, false)

mixin core(post, isRepost, repost)
	- var login = (me != null);
	- var isHaveReplies = (post.repliesCount > 0);
	- var isTalk = (post.inReplyToPost !== null && post.inReplyToPost.inReplyToPost !== null);
	article.post(
			class                   = isRepost ? 'repost ' + post.type : post.type
			lang                    = post.user.lang
			itemscope
			itemtype                = 'http://schema.org/BlogPosting'
			data-id                 = post.id
			data-cursor             = isRepost ? repost.cursor : post.cursor
			data-type               = post.type
			data-user-name          = post.user.name
			data-user-screen-name   = post.user.screenName
			data-is-liked          != login ? post.isLiked.toString() : null
			data-is-reposted       != login ? post.isReposted.toString() : null
			data-is-have-replies   != isHaveReplies.toString()
			data-is-talk           != isTalk.toString())
		if isTalk
			i.fa.fa-ellipsis-v.talk-ellipsis
		if isHaveReplies
			i.fa.fa-ellipsis-v.replies-ellipsis
		if post.inReplyToPost
			+subPost(post.inReplyToPost)(class='reply-source')
		if isRepost
			p.repost-info
				a.avatar-anchor(href= config.url + '/' + repost.user.screenName)
					img.avatar(src= repost.user.avatarThumbnailUrl, alt='avatar')
				i.fa.fa-retweet
				span.reposted-by Reposted by 
				a.name(href= config.url + '/' + repost.user.screenName)= repost.user.name
		div.main
			div.avatar-area
				a.avatar-anchor(href= config.url + '/' + post.user.screenName)
					img.avatar(src= post.user.avatarThumbnailUrl, alt='avatar')
			header
				div.author(itemprop='author')
					if userSettings.displayUserNameInPost
						a.name(href= config.url + '/' + post.user.screenName)= post.user.name
						if post.user.isVerified
							img.verified-icon(src= config.resourcesUrl + '/common/verified.png', alt='verified', title='認証済み')
					if userSettings.displayUserScreenNameInPost
						p.screen-name= post.user.screenName
				if userSettings.displayCreatedAtInPost
					a.time-anchor(href= config.url + '/' + post.user.screenName + '/' + post.id, itemprop='url')
						time(datetime= post.createdAt, itemprop='dateCreated', pubdate, data-display-type='relative')= post.createdAt
			div.content(itemprop='articleBody')
				+content(post)
		footer
			div.like
				button(title= post.isLiked ? 'Unlike' : 'Like')
					if userSettings.enableSushi
						i.fa
							| 🍣
					else
						i.fa.fa-star
				p.count
					= post.likesCount != 0 ? post.likesCount : ''
			div.repost
				button(title= post.isReposted ? 'シェアを取り消し' : 'シェア')
					i.fa.fa-retweet
				p.count
					= post.repostsCount != 0 ? post.repostsCount : ''
			div.reply
				button(title='返信')
					i.fa.fa-reply
				p.count
					= post.repliesCount != 0 ? post.repliesCount : ''
{'fraction_non_alphanumeric': 0.13949433304272013, 'fraction_numerical': 0.0013949433304272015, 'mean_word_length': 2.637285986049461, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4037378', 'n_tokens_mistral': 2435, 'n_tokens_neox': 2048, 'n_words': 331}