Page MenuHomePhabricator

Prevent <pre> formatting signatures on new lines
Closed, ResolvedPublic

Description

In the Reply tool and the New Discussion tool, there is no good reason for my automagically added signature to ever be preceded by a blank space on a new line (which triggers <pre> formatting). Please don't allow me to do things that produce these results.

Event Timeline

I wonder: @Esanders, how – if at all – is this issue related to T255741?


Additional context:

As we usually insert spaces before signatures, incorrectly setup templates can cause the signature to appear preformatted (monospace, with a grey box around);

This seems to have happened again to @Patriccck at cs.wiki. [i]

Although this time, the "preformatting" seems to have been caused by the topic's author inserting a blank line [by pressing ] in the New Discussion Tool's Description field.

Note: I've been able to reproduce this as well.[ii]


i. https://cs.wikipedia.org/w/index.php?diff=19529578&oldid=19529565&title=Diskuse_s_wikipedistou:Patka&curid=371991&diffmode=source
ii. https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Talk%3ACats&type=revision&diff=480481&oldid=476829

Change 669120 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Trim signatures when added in an empty existing node, too

https://gerrit.wikimedia.org/r/669120

I wonder: @Esanders, how – if at all – is this issue related to T255741?

Unrelated as there are no templates here. I think it's a new issue with the new topic tool.

I wonder: @Esanders, how – if at all – is this issue related to T255741?

Unrelated as there are no templates here. I think it's a new issue with the new topic tool.

Roger that. Thanks, Ed.

Change 669120 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Trim signatures when added in an empty existing node, too

https://gerrit.wikimedia.org/r/669120

The preview section is still showing the signature as pre-formatted when I add a new line in the description field while adding a new discussion.

Screen Shot 2021-03-18 at 1.44.59 PM.png (1×1 px, 124 KB)

Change 674642 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/DiscussionTools@master] Trim wikitext for preview

https://gerrit.wikimedia.org/r/674642

Change 674642 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Trim wikitext for preview

https://gerrit.wikimedia.org/r/674642