MediaWiki:Gadget-PreloadTemplates.js: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
MediaWiki:Gadget-PreloadTemplates.js (view source)
Revision as of 22:52, 31 July 2017
, 31 July 2017Fix 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; |