@fluent/syntax 0.16.1
-
Fix serialization of multiline patterns starting with special characters. (#512)
The built-in behavior of
FluentSerializer
is to serialize multiline
patterns starting on a new line:key = Foo Bar
This used to lead to syntax errors if the pattern started with one of the
special characters in the Fluent Syntax: a curly brace, a period, an
asterisk, or a square bracket, and if it was originally written with the
first line on the same line as the identifier:key = *Foo Bar
Such a pattern must not be serialized as following, because the asterisk
has a special meaning if placed at the beginning of a line.# Syntax Error key = *Foo Bar
The fix preserves the original layout of the pattern, i.e. it is now
serialized starting inline with the identifier.