|
|
Line 197: |
Line 197: |
| $(this).css('overflow-y', 'hidden'); | | $(this).css('overflow-y', 'hidden'); |
| }); | | }); |
|
| |
| // 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();
| |
| }
| |
| }); | | }); |