Re: [w3c/FileAPI] Add BlobPropertyBag.endings back to the spec. (#90)

mkruisselbrink commented on this pull request.



> +1. While |position| is not past the end of |s|:
+
+  1. If the [=code point=] at |position| within |s| equals U+000D CR
+    and the [=code point=] at |position|+1 within |s| equals U+000A LF,
+    advance |position| by 2 and append |native line ending| to |result|.
+
+  1. If the [=code point=] at |position| within |s| equals U+000A LF,
+    advance |position| by 1 and append |native line ending| to |result|.
+
+  1. Let |token| be the result of [=collecting a sequence of code points=]
+    that are not equal to U+000A LF or U+000D CR
+    from |s| given |position|.
+
+  1. Append |token| to |result|.
+
+1. Return |result|.

Good point, I more or less copied the algorithm from https://www.w3.org/TR/2012/WD-FileAPI-20121025/#convenienceAPI, but definitely should also convert a lone CR to native.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/pull/90#discussion_r153773434

Received on Wednesday, 29 November 2017 12:29:52 UTC