MediaWiki:Gadget-PreloadTemplates.js: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
Fix for multiple tags
(debug)
(Fix for multiple tags)
Line 371: Line 371:
     // Parse MediaWiki code to allow the use of incudeoonly and noninclude tags in the preload page
     // Parse MediaWiki code to allow the use of incudeoonly and noninclude tags in the preload page
     function parseMW(source){
     function parseMW(source){
         var parsed = source.replace(/<includeonly>(\n)?|(\n)?<\/includeonly>|\s*<noinclude>[^]*<\/noinclude>/g, '');
         var parsed = source.replace(/<includeonly>(\n)?|(\n)?<\/includeonly>|\s*<noinclude>[^]*?<\/noinclude>/g, '');
          
          
         return parsed;
         return parsed;
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.