I’ll preface this by saying this probably belongs in a GitHub issue, and I’ll be happy to create one over there if we want one. But wanted to get people’s thoughts first, and ASAP because now is our last chance to do this without breaking backwards compatibility (once 5.2.0 is released, it would be pretty hard to change).
Would it make sense to prohibit leading and trailing whitespace in field names, even though we now allow whitespace elsewhere? In the prerelease, it’s not possible to add such fields within the GUI, but you can import tiddlers that contain such fields, or create them with an action or $edit-text widget. Fields with leading or trailing whitespace are almost impossible to distinguish within the GUI, since there is already whitespace before and after the name when it’s displayed.
In addition, if we continue to prohibit leading and trailing whitespace, I think we would be able to allow whitespace in between filter steps, which is a common annoyance for new users (but maybe I’m missing something there).
I can’t think of any situation in which someone would want leading or trailing whitespace in a field name, except maybe to integrate with another system which allowed it for some reason – as evidenced by the fact that the GUI doesn’t even let you create such a field. At any rate, it seems much more confusing than helpful. Unix filenames have suffered enormously from being overly permissive in what characters they allow, including leading and trailing whitespace; my instinct tells me this is likely to be a continuing irritation.
On the minus side, someone would of course have to implement checks to prevent these fields from being added.