isVideo,
md,
mdToHtml,
+ mdToHtmlInline,
numToSI,
relTags,
setupTippy,
title={url}
rel={relTags}
>
- {post.name}
+ <div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
</a>
),
none: (
to={`/post/${post.id}`}
title={i18n.t("comments")}
>
- {post.name}
+ <div dangerouslySetInnerHTML={mdToHtmlInline(post.name)} />
</Link>
),
})}
return { __html: md.render(text) };
}
+export function mdToHtmlInline(text: string) {
+ return { __html: md.renderInline(text) };
+}
+
export function getUnixTime(text: string): number {
return text ? new Date(text).getTime() / 1000 : undefined;
}