Python implementation of Project Fluent
Repo projectfluent/python-fluent, read from GitHub 8 h ago. projectfluent has not joined Take My Repo.
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
BarThis 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
BarSuch 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
Documentation and package metadata updated.
Updated documentation and package metadata.
BaseNode.traverse method.Visitor and Transformer into fluent.syntax.visitor (from .ast)