MediaWiki:Common.js: Difference between revisions

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


function formatParagraphs(text) {
function formatParagraphs(text) {
    var paragraphs = text.split('\n').filter(p => p.trim() !== '');
        // Split the text into paragraphs and wrap each in a <span>
    return paragraphs.map(p => '<p>' + p.trim() + '</p>').join('');
        var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
}
        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