File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments