fluent-rs icon indicating copy to clipboard operation
fluent-rs copied to clipboard

Parser swallows leading whitespace after indented placeable

Open RumovZ opened this issue 3 years ago • 2 comments

In this fixture, the leading whitespace in front of "four" is preserved as expected:

key12 =
{ "." }
    four

However, with normalized indentation, it is not:

key12 =
    { "." }
        four

This is wrongly parsed to the same AST as this:

key12 =
    { "." }
    four

RumovZ avatar Nov 09 '22 22:11 RumovZ

I'm tentatively marking this as a good first issue since it will probably be a relatively small patch, but you should probably like parsers if you want to take this one.

gregtatum avatar Nov 10 '22 15:11 gregtatum

When this is fixed, crlf.ftl may be removed from the IGNORE_LIST in fluent-syntax/tests/serializer_fixtures.rs.

RumovZ avatar Nov 10 '22 16:11 RumovZ