Open
Bug 1402600
Opened 8 years ago
Updated 8 years ago
Spans for comments should not include the trailing newline
Categories
(L20n :: Python Library, enhancement)
L20n
Python Library
Tracking
(Not tracked)
NEW
People
(Reporter: stas, Unassigned)
Details
Even thought Comments are correctly parsed, get_comment consumes the trailing newline and the with_span decorator returns a wrong offset.
Comment 1•8 years ago
|
||
This is probably rooted in a spec bug, the ebnf for the grammar productions includes a trailing newline, https://github.com/projectfluent/fluent/blob/69ecabcc06cf6f5b3654c439a9defc8575744313/spec/fluent.ebnf#L6-L8, which conflicts with the body production.
comment ::= ('#' (inline-space (char - line-break)*)? line-break)+
| ('##' (inline-space (char - line-break)*)? line-break)+
| ('###' (inline-space (char - line-break)*)? line-break)+
We should figure out how to fix the spec before going deeply into the fix here.
You need to log in
before you can comment on or make changes to this bug.
Description
•