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

annevk 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|.

Up to you really. There's probably some things to abstract here as there's many places dealing with LF/CRLF/CR, but no rush.

-- 
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_r153776314

Received on Wednesday, 29 November 2017 12:44:26 UTC