mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-30 19:16:39 +00:00
Merge "modifier: Fix whitespace trim inconsistency"
This commit is contained in:
commit
027f8983a2
|
@ -478,7 +478,7 @@ class CommentModifier {
|
|||
// If the last node is empty, trim the signature to prevent leading whitespace triggering
|
||||
// preformatted text (T269188, T276612)
|
||||
if ( !$container->lastChild->firstChild ) {
|
||||
$signature = trim( $signature );
|
||||
$signature = ltrim( $signature, ' ' );
|
||||
}
|
||||
// Sign the last line
|
||||
$container->lastChild->appendChild(
|
||||
|
|
|
@ -434,7 +434,7 @@ function appendSignature( container ) {
|
|||
// If the last node is empty, trim the signature to prevent leading whitespace triggering
|
||||
// preformatted text (T269188, T276612)
|
||||
if ( !container.lastChild.firstChild ) {
|
||||
signature = signature.trim();
|
||||
signature = signature.replace( /^ +/, '' );
|
||||
}
|
||||
// Sign the last line
|
||||
container.lastChild.appendChild(
|
||||
|
|
Loading…
Reference in a new issue