diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index c14ea2f4..7a8bdb61 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -42,6 +42,7 @@ import { isVideo, md, mdToHtml, + mdToHtmlInline, numToSI, relTags, setupTippy, @@ -459,7 +460,7 @@ export class PostListing extends Component { title={url} rel={relTags} > - {post.name} +
), none: ( @@ -468,7 +469,7 @@ export class PostListing extends Component { to={`/post/${post.id}`} title={i18n.t("comments")} > - {post.name} +
), })} diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 6494a7d9..23acfe51 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -167,6 +167,10 @@ export function mdToHtml(text: string) { 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; }