From 58c25d115717ea01c1f04119eca2985f423c4c3a Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 22 May 2022 18:23:59 -0400 Subject: [PATCH] Don't render markdown for summaries. Fixes #658 --- 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 b9fe4b98..fe728ca6 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 42cb2491..372a899f 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 3a315492..253eeb4e 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 {