Skip to content

Commit

Permalink
Clarify comment
Browse files Browse the repository at this point in the history
  • Loading branch information
acelaya committed Dec 11, 2023
1 parent 464fea3 commit 0412456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/posts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type SimplePost = Pick<Post, 'body' | 'excerpt' | 'url'> & {
const postExcerpt = (body: string) => {
const excerpt = renderMarkdown(body)
.split('\n')
// Remove HTML tags
// Remove HTML/JSX tags
.flatMap((str) => str.replace(/<\/?[^>]+(>|$)/g, '').split('\n'))
// Decode HTML entities into their actual character
.map((str) => decode(str))
Expand Down

0 comments on commit 0412456

Please sign in to comment.