-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
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:
const message = `
.input {$count :number}
.match {$count}
one {{You have {$count} notification.}}
* {{You have {$count} notifications.}}
`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:
- complex-body = quoted-pattern / matcher
+ complex-body = [s] (quoted-pattern / matcher) [s]