Page MenuHomePhabricator

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

Authored by epriestley on Thu, May 30, 7:26 PM.

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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Thu, May 30, 7:26 PM
epriestley requested review of this revision.Thu, May 30, 7:28 PM
amckinley accepted this revision.Thu, May 30, 7:37 PM
This revision is now accepted and ready to land.Thu, May 30, 7:37 PM