-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code unit prefix, less than, and general sorting #248
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a couple nits. I'm also unsure if we should close #55 as it identified a number of non-code-unit cases that still need to be addressed.
|
||
<li><p>Return false if <var>aCodeUnit</var> is different from <var>bCodeUnit</var>. | ||
|
||
<li><p>Set <var>i</var> to <var>i</var> + 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used "Increment i by x" for this, but maybe this is clearer? Another thing to settle when we do numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Increment" doesn't appear in Infra yet, so I'll leave it. But we do have an outstanding feature request, in #99.
infra.bs
Outdated
<li><p>If <var>a</var> is a <a>code unit prefix</a> of <var>b</var>, then return true. | ||
|
||
<li><p>Let <var>n</var> be the smallest index such that the <var>n</var>th <a>code unit</a> of | ||
<var>a</var> is different from the <var>n</var>th code unit of <var>b</var>. (There must be such an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is* (it's a statement of fact, not a requirement).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I'll go with "There has to be".
Nits fixed. My preferred course of action would be closing #55 and opening a new feature request to add a "byte less than" or "byte ASCII lowercase less than" operation for byte sequences. Or, perhaps now that this general framework is in place, those could just be defined in Fetch. |
There was also code point order for CSSOM, but okay. |
Closes #55.
Will be needed for Import Maps.
Preview | Diff