Skip to content

Commit 3d69859

Browse files
committed
fix: added missing new line
1 parent f60b406 commit 3d69859

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/components/RecentNews.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ export default function RecentNews() {
55
const newsItems = getRecentNews(6);
66

77
const formatContent = (content: string) => {
8-
// Simple markdown-like formatting for links
9-
return content.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>');
8+
return content
9+
.replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>')
10+
.replace(/\n/g, '<br>');
1011
};
1112

1213
return (

src/lib/news.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function parseNewsFile(year: string): NewsItem[] {
4242
const next = matches[i + 1];
4343

4444
const startIndex = current.index;
45-
// Calculate how much to subtract for next header
45+
// Calculate how much to subtract for the next header
4646
// We need to find the position right before the next "###" line
4747
let endIndex: number;
4848
if (next) {

0 commit comments

Comments
 (0)