mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 08:23:52 +00:00
Merge "Don't count leading/trailing whitespace against signature scan limit"
This commit is contained in:
commit
4593a9fe91
|
@ -600,7 +600,8 @@ class CommentParser {
|
|||
}
|
||||
|
||||
if ( $event === 'leave' && $node !== $timestampNode ) {
|
||||
$length += $node instanceof Text ? mb_strlen( $node->textContent ?? '' ) : 0;
|
||||
$length += $node instanceof Text ?
|
||||
mb_strlen( CommentUtils::htmlTrim( $node->textContent ?? '' ) ) : 0;
|
||||
}
|
||||
|
||||
// Find the closest link before timestamp that links to the user's user page.
|
||||
|
|
|
@ -587,7 +587,8 @@ Parser.prototype.findSignature = function ( timestampNode, until ) {
|
|||
}
|
||||
|
||||
if ( event === 'leave' && node !== timestampNode ) {
|
||||
length += node.nodeType === Node.TEXT_NODE ? codePointLength( node.textContent ) : 0;
|
||||
length += node.nodeType === Node.TEXT_NODE ?
|
||||
codePointLength( utils.htmlTrim( node.textContent ) ) : 0;
|
||||
}
|
||||
|
||||
// Find the closest link before timestamp that links to the user's user page.
|
||||
|
|
Loading…
Reference in a new issue