User:Guywan/Scripts/RefCruncher.js: Difference between revisions

Content deleted Content added
mNo edit summary
mNo edit summary
Line 42:
text.replace(/<ref.*?>.*?<\/ref>/g, function(match)
{
console.log(match);
window.rc_refs.push(match);
return `{ref#${counter++}}`;
});
console.log(text);
txtarea.value = text;
Line 58 ⟶ 62:
text.replace(/\{ref#(\d+)\}/g, function(match, p1)
{
console.log(match);
return window.rc_refs.pop(Number(p1));
});