4,408
edits
No edit summary |
No edit summary |
||
Line 110: | Line 110: | ||
// Check if the related-articles div has content and add a label | // Check if the related-articles div has content and add a label | ||
if (relatedArticlesHtml && relatedArticlesHtml.trim().length > 0) { | |||
$('#related-articles').html('<div class="related-articles-label">Related Articles</div><div class="related-articles-container">' + relatedArticlesHtml + '</div>').show(); | |||
} else { | |||
$('#related-articles').html('<div class="related-articles-label">No related articles found.</div>').show(); | |||
} | |||
function formatParagraphs(text) { | function formatParagraphs(text) { | ||
// Split the text into paragraphs and wrap each in a <span> | // Split the text into paragraphs and wrap each in a <span> |