aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-08-11 09:19:36 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-08-11 09:19:36 -0700
commit3a01183039dd637e040ab368ff8b45d6c0e01c7e (patch)
treed07087dbd767aa35af507364a8ff1f677d6415b1
parent3b64d8dd1fc4d2c6308013200d9a491c579dd413 (diff)
Removed ambiguities concerning lines and line endings.
The previous spec allowed, technically, that a line ending in CR NL might be considered to have two line endings, or that the CR might be considered part of the line and the NL the line ending. These fixes rule out those interpretations. Closes #357. Thanks to Lasse R.H. Nielsen.
-rw-r--r--spec.txt6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec.txt b/spec.txt
index ad18245..c0f6c79 100644
--- a/spec.txt
+++ b/spec.txt
@@ -214,10 +214,12 @@ of [character]s rather than bytes. A conforming parser may be limited
to a certain encoding.
A [line](@line) is a sequence of zero or more [character]s
+other than newline (`U+000A`) or carriage return (`U+000D`),
followed by a [line ending] or by the end of file.
-A [line ending](@line-ending) is a newline (`U+000A`), carriage return
-(`U+000D`), or carriage return + newline.
+A [line ending](@line-ending) is a newline (`U+000A`), a carriage return
+(`U+000D`) not followed by a newline, or a carriage return and a
+following newline.
A line containing no characters, or a line containing only spaces
(`U+0020`) or tabs (`U+0009`), is called a [blank line](@blank-line).