Skip to content

Commit

Permalink
Fix newline issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Trialpearswiki committed Feb 24, 2023
1 parent 93c1a04 commit 342adb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/twinklexfd.js
Original file line number Diff line number Diff line change
Expand Up @@ -2016,8 +2016,8 @@ Twinkle.xfd.callbacks = {
var params = pageobj.getCallbackParameters();
var statelem = pageobj.getStatusElement();

var placementRE = /===== ?Requests to revert undiscussed moves ?=====/i;
var newtext = text.replace(placementRE, Twinkle.xfd.callbacks.getDiscussionWikitext('rm', params) + '\n$&');
var placementRE = /\n\n?(===== ?Requests to revert undiscussed moves ?=====)/i;
var newtext = text.replace(placementRE, Twinkle.xfd.callbacks.getDiscussionWikitext('rm', params) + '\n$1');
if (text === newtext) {
statelem.error('failed to find target spot for the entry');
return;
Expand Down

0 comments on commit 342adb2

Please sign in to comment.