MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Tag: Reverted
Line 6: Line 6:


function formatParagraphs(text) {
function formatParagraphs(text) {
        // Split the text into paragraphs and wrap each in a <span>
    var paragraphs = text.split('\n').filter(p => p.trim() !== '');
        var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
    return paragraphs.map(p => '<p>' + p.trim() + '</p>').join('');
        return paragraphs.map(function (p) { return '<span>' + p.trim() + '</span>'; }).join('');
}
    }
 
       
     // Description formatting for Community Cards
     // Description formatting for Community Cards
     function formatCommunityCardDescriptions() {
     function formatCommunityCardDescriptions() {

Navigation menu