Skip to content

Commit 72f5970

Browse files
committed
@fluent/syntax 0.16.1
1 parent 51868f4 commit 72f5970

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

fluent-syntax/CHANGELOG.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# Changelog
22

3+
## @fluent/syntax 0.16.1 (September 15, 2020)
4+
5+
- Fix serialization of multiline patterns starting with special characters. (#512)
6+
7+
The built-in behavior of `FluentSerializer` is to serialize multiline
8+
patterns starting on a new line:
9+
10+
```properties
11+
key =
12+
Foo
13+
Bar
14+
```
15+
16+
This used to lead to syntax errors if the pattern started with one of the
17+
special characters in the Fluent Syntax: a curly brace, a period, an
18+
asterisk, or a square bracket, and if it was originally written with the
19+
first line on the same line as the identifier:
20+
21+
```properties
22+
key = *Foo
23+
Bar
24+
```
25+
26+
Such a pattern must not be serialized as following, because the asterisk
27+
has a special meaning if placed at the beginning of a line.
28+
29+
```properties
30+
# Syntax Error
31+
key =
32+
*Foo
33+
Bar
34+
```
35+
36+
The fix preserves the original layout of the pattern, i.e. it is now
37+
serialized starting inline with the identifier.
38+
339
## @fluent/syntax 0.16.0 (July 2, 2020)
440

541
- Remove the `compat.js` build and compile everything to ES2018. (#472)

fluent-syntax/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@fluent/syntax",
33
"description": "AST and parser for Fluent",
4-
"version": "0.16.0",
4+
"version": "0.16.1",
55
"homepage": "https://projectfluent.org",
66
"author": "Mozilla <[email protected]>",
77
"license": "Apache-2.0",

0 commit comments

Comments
 (0)