mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(catalog): greentext and markdown styling shouldn't appear
This commit is contained in:
@@ -1 +1 @@
|
||||
export { default } from './popular-threads-box';
|
||||
export { default, ContentPreview } from './popular-threads-box';
|
||||
|
||||
@@ -18,7 +18,7 @@ interface PopularThreadProps {
|
||||
boardShortAddress: string;
|
||||
}
|
||||
|
||||
const ContentPreview = ({ content, maxLength = 99 }: { content: string; maxLength?: number }) => {
|
||||
export const ContentPreview = ({ content, maxLength = 99 }: { content: string; maxLength?: number }) => {
|
||||
const plainText = removeMarkdown(content).trim().replaceAll(' ', '').replace(/\n\n/g, '\n').replaceAll('\n\n', '');
|
||||
const truncatedText = plainText.length > maxLength ? `${plainText.substring(0, maxLength).trim()}...` : plainText;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user