-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow leading and trailing whitespace in complex messages #809
Comments
See https://github.com/unicode-org/message-format-wg/blob/main/exploration/pattern-exterior-whitespace.md for previous discussion on this. |
I am not sure how relevant that discussion is, as it focuses on trimming white space around unquoted patterns (like simple message). I however am only concerned about complex messages here, which can not contain unquoted patterns. Additionally the spec already agrees that quotes before quoted patterns are not meaningful: for example, the optional space between |
The perhaps more relevant prior discussion is #610, where I hit the same issue. |
With #812 I have added this to the agenda of the 2024-07-01 call. Note that leading whitespace conflicts with simple message processing, as described in the PEWS design document @catamorphism linked above. |
The WG agreed to permit opening and trailing whitespace in complex messages. Waiting to merge #854 to close this issue. |
Currenly, complex messages can not start or end with whitespace. The first character of a complex message must either be
.
or{
, and the final character must be}
. This is unfortunate, because this results in unnecessary complexity for users.Example:
This does not work right now, because there is whitespace between the string start, and the first char of the complex message, and the trailing
}
and the end of the string.This can not be remedied by just trimming all messages, because for simple messages, leading and trailing whitespace is significant.
For complex messages, leading and trailing whitespace is not significant, because all chars outside of a
quoted-pattern
are control characters and not relevant for display (they are not included in the output message).To fix this,
complex-message
grammar can be changed as follows:The text was updated successfully, but these errors were encountered: