4,431
edits
No edit summary |
No edit summary |
||
Line 180: | Line 180: | ||
// Description formatting for Community Cards | // Description formatting for Community Cards | ||
function formatCommunityCardDescriptions() { | |||
console.log("Formatting community card descriptions"); | |||
$('.community-card').each(function() { | |||
console.log("Processing a community card"); | |||
var descriptionContainer = $(this).find('.community-description'); | |||
var rawDescription = descriptionContainer.text(); | |||
console.log("Raw Description:", rawDescription); | |||
var formattedDescription = formatParagraphs(rawDescription); | |||
descriptionContainer.html(formattedDescription); | |||
console.log("Formatted Description HTML:", descriptionContainer.html()); | |||
}); | |||
} | |||
// Check if we are on a page that requires community card formatting | |||
if ($('.community-card').length) { | |||
formatCommunityCardDescriptions(); | |||
} | |||
}); | }); |