User:Chaotic Enby/Unblock wizard.js: Difference between revisions

From Test Wiki
Content deleted Content added
rpleace
No edit summary
Line 425: Line 425:
setMainStatus('process', msg('status-saving'));
setMainStatus('process', msg('status-saving'));
if (demoMode) {
if (demoMode) {
setMainStatus('success', '<syntaxhighlight lang="">' + text + '</syntaxhighlight>');
setMainStatus('success', '<code style="display: block; white-space: pre-wrap">' + text + '</code>');
} else {
} else {
saveUserTalkPage(userTalk, apiPage.revisions[0].slots.main.content + text).then(function () {
saveUserTalkPage(userTalk, apiPage.revisions[0].slots.main.content + text).then(function () {
Line 573: Line 573:
function linkify(input) {
function linkify(input) {
return input
return input
.replace(/\{\{pb\}\}/, '<br>')
.replace(/\{\{pb\}\}/g, '<br>')
.replace(
.replace(
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g,
/\[\[:?(?:([^|\]]+?)\|)?([^\]|]+?)\]\]/g,