Skip to content

fluent.syntax 0.18.1

Compare
Choose a tag to compare
@stasm stasm released this 15 Sep 11:54
  • Fix serialization of multiline patterns starting with special characters. (#156)

    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