MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Manual revert
No edit summary
Line 8: Line 8:
         // Split the text into paragraphs and wrap each in a <span>
         // Split the text into paragraphs and wrap each in a <span>
         var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
         var paragraphs = text.split('\n').filter(function (p) { return p.trim() !== '' });
         return paragraphs.map(function (p) { return '<span>' + p.trim() + '</span>'; }).join('');
         return paragraphs.map(function (p) { return '<p>' + p.trim() + '</p>'; }).join('');
     }
     }
          
          

Navigation menu