Page MenuHomePhabricator

Require valid comments to contain at least one non-whitespace character
ClosedPublic

Authored by epriestley on May 30 2019, 7:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 30, 9:21 PM
Unknown Object (File)
Fri, Mar 29, 2:50 AM
Unknown Object (File)
Sat, Mar 23, 7:22 AM
Unknown Object (File)
Sat, Mar 23, 7:22 AM
Unknown Object (File)
Thu, Mar 21, 7:02 AM
Unknown Object (File)
Feb 13 2024, 5:19 PM
Unknown Object (File)
Jan 20 2024, 4:42 PM
Unknown Object (File)
Jan 16 2024, 5:47 PM
Subscribers
None

Details

Summary

See downstream https://phabricator.wikimedia.org/T88655. This is very marginal, but we currently allow comments consisting of only whitespace.

These are probably always mistakes, so treat them like completely empty comments.

(We intentionally do not trim leading or trailing whitespace from comments when posting them becuase leading spaces can be used to trigger codeblock formatting.)

Test Plan
  • Posted empty, nonempty, and whitespace-only comments.
  • Whitespace-only comments now have the same behavior as truly empty comments (e.g., do not actually generate a transaction).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable