Open acoglio opened 2 years ago
If we do this, we may also want to prohibit isolated CR, i.e. CR not followed by LF.
In the grammar, this can be done by re-arranging a few rules to be more explicit about line terminators vs. other kinds of characters.
I'm in favor of this change.
This issue is still relevant. We need to make a decision, also because currently there is a discrepancy between the grammar's notion of line terminators and the span file analyzer's notion of line terminator.
🚀 Feature
LF is used on Unix/Linux/macOS.
CR LF is used on Windows, as well as in some Internet standards like ABNF itself.
CR was used in Classic Mac OS, whose last release is over 20 years ago.
Unless there's a good reason to support CR, we could decide to support just LF or CR LF.
Aside from the slight simplification and increased minimalism, this may make some current bugs (#1716 and #1718) go away. In particular, it makes LF a reliable indicator of a line terminator, whether it is preceded by CR or not.