From 321339c6c51eb635ecb2dea8f933a5e2b8c0c69d Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 23 May 2022 07:13:41 -0400 Subject: [PATCH] Don't render markdown for summaries. Fixes #658 (#659) --- src/assets/css/main.css | 8 ++++++++ src/shared/components/person/profile.tsx | 3 +-- src/shared/components/post/post-listing.tsx | 12 ++---------- src/shared/components/post/post.tsx | 4 +--- src/shared/utils.ts | 15 --------------- 5 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/assets/css/main.css b/src/assets/css/main.css index b9fe4b9..fe728ca 100644 --- a/src/assets/css/main.css +++ b/src/assets/css/main.css @@ -374,3 +374,11 @@ br.big { .slight-radius { border-radius: 4px; } + +.preview-lines { + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; +} diff --git a/src/shared/components/person/profile.tsx b/src/shared/components/person/profile.tsx index 42cb249..372a899 100644 --- a/src/shared/components/person/profile.tsx +++ b/src/shared/components/person/profile.tsx @@ -34,7 +34,6 @@ import { isMod, mdToHtml, numToSI, - previewLines, relTags, restoreScrollPosition, routeSortTypeToEnum, @@ -221,7 +220,7 @@ export class Profile extends Component { get bioTag(): string { return this.state.personRes.person_view.person.bio - ? previewLines(this.state.personRes.person_view.person.bio) + ? this.state.personRes.person_view.person.bio : undefined; } diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 3a31549..253eeb4 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -35,7 +35,6 @@ import { md, mdToHtml, numToSI, - previewLines, relTags, setupTippy, showScores, @@ -355,9 +354,7 @@ export class PostListing extends Component {