Skip to content

Commit

Permalink
no need to split tilde sequences as everything is wrapped in nowiki tags
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthvp committed Nov 4, 2021
1 parent b82ad0b commit 1132fb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/modules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@
text = text.replace( /<\/template>/g, '}}' );
text = text.replace( /<part>/g, '|' );

// Expand embedded tags (like <nowiki>)
// Expand embedded tags (like nowiki)
text = text.replace( new RegExp( '<ext><name>(.*?)<\\/name>(?:<attr>.*?<\\/attr>)*' +
'<inner>(.*?)<\\/inner><close>(.*?)<\\/close><\\/ext>', 'g' ), '&lt;$1&gt;$2$3' );

Expand Down Expand Up @@ -826,7 +826,7 @@
} );
}

appendText += ' ~~' + '~~' + '~\n';
appendText += ' ~~~~~\n';

logPage.edit( {
contents: appendText,
Expand Down
10 changes: 5 additions & 5 deletions src/modules/submissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@
AFCH.Submission.prototype.addNewComment = function ( text ) {
var commentText = $.trim( text );

if ( commentText.indexOf( '~~' + '~~' ) === -1 ) {
commentText += ' ~~' + '~~';
if ( commentText.indexOf( '~~~~' ) === -1 ) {
commentText += ' ~~~~';
}

this.comments.unshift( {
Expand Down Expand Up @@ -1135,7 +1135,7 @@
// $1 = article name
// $2 = article class or '' if not available
'accepted-submission': headerBegin +
'[[$1]] has been accepted ==\n{{subst:Afc talk|$1|class=$2|sig=~~' + '~~}}',
'[[$1]] has been accepted ==\n{{subst:Afc talk|$1|class=$2|sig=~~~~}}',

// $1 = full submission title
// $2 = short title
Expand All @@ -1162,9 +1162,9 @@
'comment-on-submission': '{{subst:AFC notification|comment|article=$1}}',

// $1 = article name
'g13-submission': '{{subst:Db-afc-notice|$1}} ~~' + '~~',
'g13-submission': '{{subst:Db-afc-notice|$1}} ~~~~',

'teahouse-invite': '{{subst:Wikipedia:Teahouse/AFC invitation|sign=~~' + '~~}}'
'teahouse-invite': '{{subst:Wikipedia:Teahouse/AFC invitation|sign=~~~~}}'
} );
}

Expand Down

0 comments on commit 1132fb0

Please sign in to comment.