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

Not sure I like the shorter phrasing though. I think being explicit is good in this case since both the search strings are subsets of each other, and the replacement string is also part of the search strings, so there is plenty of possibly ambiguity in what exactly it means to do such a search/replace operation.

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

Received on Wednesday, 29 November 2017 12:31:47 UTC