User:Waldyrious/formatcitations.js: Difference between revisions

Content deleted Content added
forgot a small detail that was tweaked during testing
also align }} and don't keep adding newlines if there already is one
Line 26:
 
// Replace the original templates with the tweaked versions
txt.value = txt.value.replace(originalCiteTemplates[i], tweakedCiteTemplates[i].replace(/ *\n? *\}\}/g,"\n }}")); // The replace() adds a newline to finish the alignment
} else {
txt.value = txt.value.replace(originalCiteTemplates[i],